binary_approx Struct Reference

#include <cell_mv_bernstein.hpp>

Inheritance diagram for binary_approx:
binary_isolate

List of all members.

Static Public Member Functions

Static Public Attributes


Detailed Description

Definition at line 104 of file cell_mv_bernstein.hpp.


Member Function Documentation

bool reduce ( Cell *  cl  )  [inline, static]

Reimplemented in binary_isolate.

Definition at line 150 of file cell_mv_bernstein.hpp.

References mmx::has_sign_variation(), and binary_approx::m_eps.

00150                               {  
00151   if(cl->size() < m_eps) return false;
00152   for(unsigned i=0;i<cl->nbeq();i++)
00153     if(!has_sign_variation(cl->equation(i))) return false;
00154   return true; 
00155 }

bool regular ( Cell *  cl  )  [inline, static]

Definition at line 158 of file cell_mv_bernstein.hpp.

References mmx::has_sign_variation().

00158                                { 
00159   for(unsigned i=0;i<cl->nbeq();i++)
00160     if(!has_sign_variation(cl->equation(i))) return false;
00161   return true;
00162 }

void subdivide ( Cell *  cl,
Stack *  stack 
) [inline, static]

Definition at line 122 of file cell_mv_bernstein.hpp.

References Scalar, and mmx::tensor::split().

00122                                             {
00123   //std::cout<<"Subdivide "<<cl->equation(0)<< " "<<cl->domain(0)<<std::endl;
00124 
00125   Cell* left  = new Cell(*cl);
00126   Cell* right = new Cell(*cl);
00127 
00128   unsigned v=0; 
00129   typename Cell::Scalar s=cl->domain(0).upper()-cl->domain(0).lower(),s0;
00130   for (unsigned i=0;i<cl->nbvar();i++)
00131     if((s0=cl->domain(i).upper()-cl->domain(i).lower())>s) {
00132         s=s0;v=i;
00133     }
00134   typename Cell::Scalar m=(cl->domain(v).upper()+cl->domain(v).lower())/2;
00135 
00136   for (unsigned i=0;i<cl->nbeq();i++)
00137     tensor::split(left->equation(i), right->equation(i), v);
00138   left->domain(v).upper()=m;
00139   right->domain(v).lower()=m;
00140 
00141   //  std::cout<<"==> "<<left->equation(0)<< " "<<left->domain(0)<<std::endl;
00142   //  std::cout<<"==> "<<right->equation(0)<< " "<<right->domain(0)<<std::endl;
00143   //  std::cout<<std::endl;
00144 
00145   st->push(left); 
00146   st->push(right);
00147 };


Member Data Documentation

double m_eps = 1e-6 [static]

Definition at line 106 of file cell_mv_bernstein.hpp.

Referenced by binary_isolate::reduce(), and binary_approx::reduce().


The documentation for this struct was generated from the following file:

Generated on 6 Dec 2012 for realroot by  doxygen 1.6.1