#include <solver_ucf.hpp>
Definition at line 47 of file solver_ucf.hpp.
interval_rep | ( | ) | [inline] |
Definition at line 56 of file solver_ucf.hpp.
interval_rep | ( | const POL | p | ) | [inline] |
Definition at line 58 of file solver_ucf.hpp.
interval_rep | ( | const POL | p, | |
homography< C > | h | |||
) | [inline] |
Definition at line 64 of file solver_ucf.hpp.
interval_rep | ( | const POL | p, | |
C | u, | |||
C | v | |||
) | [inline] |
Definition at line 71 of file solver_ucf.hpp.
References interval_rep< POL >::contract_box(), interval_rep< POL >::reverse_and_shift_box(), and interval_rep< POL >::shift_box().
00072 { 00073 f = p; 00074 hg = homography<C>() ; 00075 00076 shift_box ( u ); 00077 contract_box ( v-u ); 00078 reverse_and_shift_box (1); 00079 //print(); 00080 }
void contract_box | ( | const C & | t | ) | [inline] |
Definition at line 163 of file solver_ucf.hpp.
References homography< real >::contract_hom(), and mmx::pow().
Referenced by interval_rep< POL >::interval_rep().
00164 { 00165 int s, sz= f.size(); 00166 00167 for ( s = 0 ; s < sz; ++s ) 00168 f[s] *= pow(t,s) ; 00169 00170 //update homography 00171 hg.contract_hom(t); 00172 };
Definition at line 89 of file solver_ucf.hpp.
References homography< real >::a, homography< real >::b, homography< real >::c, homography< real >::d, and Real.
Referenced by interval_rep< POL >::print().
00090 { 00091 Real l, r; 00092 Interval<Real> s ; 00093 //lim to 0 00094 if ( hg.b!=0 && hg.d!=0 ) 00095 l= as<Real>(hg.b)/as<Real>(hg.d); 00096 else if ( hg.d==0 ) 00097 l= 10000000; 00098 else if ( hg.b==0 ) 00099 l= 0 ; 00100 else 00101 l= as<Real>(hg.a)/as<Real>(hg.c) ; 00102 //lim to inf 00103 if ( hg.a!=0 && hg.c!=0 ) 00104 r= as<Real>(hg.a)/as<Real>(hg.c); 00105 else if ( hg.c==0 ) 00106 r=10000000; 00107 else if ( hg.a==0 ) 00108 r= 0 ; 00109 else 00110 r= as<Real>(hg.b)/as<Real>(hg.d); 00111 00112 if ( l<=r ) s= Interval<Real>(l,r); 00113 else s= Interval<Real>(r,l); 00114 00115 return s; 00116 }
homography<C> hom | ( | ) | [inline] |
Definition at line 85 of file solver_ucf.hpp.
C middle | ( | ) | [inline] |
Definition at line 133 of file solver_ucf.hpp.
References homography< real >::c, and homography< real >::d.
Real point | ( | C & | t | ) | [inline] |
Definition at line 127 of file solver_ucf.hpp.
References homography< real >::a, homography< real >::b, homography< real >::c, homography< real >::d, and Real.
POL poly | ( | ) | [inline] |
Definition at line 83 of file solver_ucf.hpp.
Referenced by solver_cffirst< Real, POL >::first_root_isolate(), and interval_rep< POL >::print().
void print | ( | ) | [inline] |
Definition at line 193 of file solver_ucf.hpp.
References homography< real >::a, homography< real >::b, homography< real >::c, homography< real >::d, interval_rep< POL >::domain(), interval_rep< POL >::poly(), and interval_rep< POL >::sign_var().
00194 { 00195 std::cout << "----------Interval---------------" << "\n" ; 00196 std::cout << poly() << "\n" ; 00197 std::cout<< "("<<hg.a <<"x + " << hg.b<<")/("<<hg.c<<"x+ "<<hg.d << ")"<<", sv:"<<sign_var() <<std::endl; 00198 std::cout << domain() << "\n" ; 00199 std::cout << "-------------------------------" << "\n" ; 00200 }
void reverse_and_shift_box | ( | const C & | t = 1 |
) | [inline] |
Definition at line 187 of file solver_ucf.hpp.
References interval_rep< POL >::reverse_box(), and interval_rep< POL >::shift_box().
Referenced by interval_rep< POL >::interval_rep().
00188 { 00189 reverse_box(t); 00190 shift_box (C(1)); 00191 };
void reverse_box | ( | const C & | t = 1 |
) | [inline] |
Definition at line 175 of file solver_ucf.hpp.
References homography< real >::reciprocal_hom(), and mmx::sparse::swap().
Referenced by interval_rep< POL >::reverse_and_shift_box().
00176 { 00177 unsigned s, l= f.size()-1; 00178 00179 for (s = 0 ; s <= l/2; s++ ) 00180 std::swap(f[s], f[l-s]); 00181 00182 //update homography 00183 hg.reciprocal_hom(t); 00184 };
void shift_box | ( | const C & | t | ) | [inline] |
Definition at line 150 of file solver_ucf.hpp.
References homography< real >::shift_hom().
Referenced by interval_rep< POL >::interval_rep(), and interval_rep< POL >::reverse_and_shift_box().
unsigned sign_var | ( | ) | [inline] |
Definition at line 143 of file solver_ucf.hpp.
References mmx::sign_variation().
Referenced by interval_rep< POL >::print().
00144 { 00145 return sign_variation(f.begin(),f.end()) ; 00146 }
Real width | ( | ) | [inline] |
Definition at line 120 of file solver_ucf.hpp.
References Real.
00121 { 00122 return this->template domain<Real>().width(); 00123 }