#include <subdivisor_mv_binary.hpp>
Definition at line 19 of file subdivisor_mv_binary.hpp.
bool reduce | ( | Cell * | cl | ) | [inline, static] |
Reimplemented in mv_binary_isolate.
Definition at line 65 of file subdivisor_mv_binary.hpp.
References mmx::has_sign_variation(), and mv_binary_approx::m_eps.
00065 { 00066 if(cl->size() < m_eps) return false; 00067 for(unsigned i=0;i<cl->nbeq();i++) 00068 if(!has_sign_variation(cl->equation(i))) return false; 00069 return true; 00070 }
bool regular | ( | Cell * | cl | ) | [inline, static] |
Definition at line 73 of file subdivisor_mv_binary.hpp.
References mmx::has_sign_variation().
00073 { 00074 for(unsigned i=0;i<cl->nbeq();i++) 00075 if(!has_sign_variation(cl->equation(i))) return false; 00076 return true; 00077 }
void subdivide | ( | Cell * | cl, | |
Stack * | stack | |||
) | [inline, static] |
Definition at line 37 of file subdivisor_mv_binary.hpp.
References Scalar, and mmx::tensor::split().
00037 { 00038 //std::cout<<"Subdivide "<<cl->equation(0)<< " "<<cl->domain(0)<<std::endl; 00039 00040 Cell* left = new Cell(*cl); 00041 Cell* right = new Cell(*cl); 00042 00043 unsigned v=0; 00044 typename Cell::Scalar s=cl->domain(0).upper()-cl->domain(0).lower(),s0; 00045 for (unsigned i=0;i<cl->nbvar();i++) 00046 if((s0=cl->domain(i).upper()-cl->domain(i).lower())>s) { 00047 s=s0;v=i; 00048 } 00049 typename Cell::Scalar m=(cl->domain(v).upper()+cl->domain(v).lower())/2; 00050 00051 for (unsigned i=0;i<cl->nbeq();i++) 00052 tensor::split(left->equation(i), right->equation(i), v); 00053 left->domain(v).upper()=m; 00054 right->domain(v).lower()=m; 00055 00056 // std::cout<<"==> "<<left->equation(0)<< " "<<left->domain(0)<<std::endl; 00057 // std::cout<<"==> "<<right->equation(0)<< " "<<right->domain(0)<<std::endl; 00058 // std::cout<<std::endl; 00059 00060 st->push(left); 00061 st->push(right); 00062 };
double m_eps = 1e-6 [static] |
Definition at line 21 of file subdivisor_mv_binary.hpp.
Referenced by mv_binary_isolate::reduce(), and mv_binary_approx::reduce().