realroot_doc 0.1.1
|
#include <cell_mv_bernstein.hpp>
Definition at line 104 of file cell_mv_bernstein.hpp.
bool reduce | ( | Cell * | cl | ) | [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.
{ if(cl->size() < m_eps) return false; for(unsigned i=0;i<cl->nbeq();i++) if(!has_sign_variation(cl->equation(i))) return false; return true; }
bool regular | ( | Cell * | cl | ) | [static] |
Definition at line 158 of file cell_mv_bernstein.hpp.
References mmx::has_sign_variation().
{ for(unsigned i=0;i<cl->nbeq();i++) if(!has_sign_variation(cl->equation(i))) return false; return true; }
void subdivide | ( | Cell * | cl, |
Stack * | stack | ||
) | [static] |
Definition at line 122 of file cell_mv_bernstein.hpp.
References Scalar, and mmx::tensor::split().
{ //std::cout<<"Subdivide "<<cl->equation(0)<< " "<<cl->domain(0)<<std::endl; Cell* left = new Cell(*cl); Cell* right = new Cell(*cl); unsigned v=0; typename Cell::Scalar s=cl->domain(0).upper()-cl->domain(0).lower(),s0; for (unsigned i=0;i<cl->nbvar();i++) if((s0=cl->domain(i).upper()-cl->domain(i).lower())>s) { s=s0;v=i; } typename Cell::Scalar m=(cl->domain(v).upper()+cl->domain(v).lower())/2; for (unsigned i=0;i<cl->nbeq();i++) tensor::split(left->equation(i), right->equation(i), v); left->domain(v).upper()=m; right->domain(v).lower()=m; // std::cout<<"==> "<<left->equation(0)<< " "<<left->domain(0)<<std::endl; // std::cout<<"==> "<<right->equation(0)<< " "<<right->domain(0)<<std::endl; // std::cout<<std::endl; st->push(left); st->push(right); };
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().