bcell2d_algebraic_curve< C, V > Class Template Reference

#include <bcell2d_algebraic_curve.hpp>

Inheritance diagram for bcell2d_algebraic_curve< C, V >:
bcell2d< C, REF_OF(V) > bcell< C, REF_OF(REF_OF(V)) > cell< C, V > bounding_box< C, V > bcell2d_semialgebraic_curve< C, V > bcell2d_voronoi_site2d< C, V >

List of all members.

Public Types

Public Member Functions

Public Attributes

Protected Attributes


Detailed Description

template<class C, class V = default_env>
class mmx::shape::bcell2d_algebraic_curve< C, V >

Definition at line 174 of file bcell2d_algebraic_curve.hpp.


Member Typedef Documentation

typedef algebraic_curve<C, REF_OF(V) > AlgebraicCurve

Definition at line 186 of file bcell2d_algebraic_curve.hpp.

typedef algebraic_set<C, REF_OF(V) > AlgebraicSet

Definition at line 185 of file bcell2d_algebraic_curve.hpp.

typedef bounding_box<C, REF_OF(V) > BoundingBox
typedef bcell<C, REF_OF(V) > Cell

Reimplemented from bcell2d< C, REF_OF(V) >.

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 184 of file bcell2d_algebraic_curve.hpp.

typedef topology<C, REF_OF(V) >::Edge Edge

Reimplemented from bcell2d< C, REF_OF(V) >.

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 183 of file bcell2d_algebraic_curve.hpp.

typedef mesher2d<C,V> Mesher2d

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 191 of file bcell2d_algebraic_curve.hpp.

typedef Seq<Point*> Points

Definition at line 179 of file bcell2d_algebraic_curve.hpp.

typedef polynomial< Interval<C>, with<Bernstein> > Polynomial
typedef C Scalar

Definition at line 176 of file bcell2d_algebraic_curve.hpp.

typedef solver_implicit<C,V> Solver

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 190 of file bcell2d_algebraic_curve.hpp.

typedef topology<C, REF_OF(V) > Topology

Reimplemented from bcell2d< C, REF_OF(V) >.

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 177 of file bcell2d_algebraic_curve.hpp.

typedef use<point_def,C,V>::Point Vector

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 182 of file bcell2d_algebraic_curve.hpp.


Constructor & Destructor Documentation

bcell2d_algebraic_curve ( const Polynomial pol,
const BoundingBox bx,
bool  inter = true 
) [inline]
bcell2d_algebraic_curve ( const char *  s,
const BoundingBox b 
) [inline]

Definition at line 303 of file bcell2d_algebraic_curve.hpp.

References mmx::assign(), bcell2d< C, REF_OF(V) >::e_intersections, solver_implicit< C, V >::east_edge, solver_implicit< C, V >::edge_point(), solver_implicit< C, V >::extremal(), bcell2d_algebraic_curve< C, V >::m_polynomial, bcell2d< C, REF_OF(V) >::m_singular, bcell2d< C, REF_OF(V) >::n_intersections, solver_implicit< C, V >::north_edge, bcell2d< C, REF_OF(V) >::s_intersections, solver_implicit< C, V >::south_edge, bcell2d< C, REF_OF(V) >::w_intersections, solver_implicit< C, V >::west_edge, point< C, N, V >::x(), bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), point< C, N, V >::y(), bounding_box< C, V >::ymax(), and bounding_box< C, V >::ymin().

00303                                                                  : bcell2d<C,REF>(b)
00304 {
00305     Seq<mmx::GMP::rational> bx;
00306     bx<<as<mmx::GMP::rational>(b.xmin());
00307     bx<<as<mmx::GMP::rational>(b.xmax());
00308     bx<<as<mmx::GMP::rational>(b.ymin());
00309     bx<<as<mmx::GMP::rational>(b.ymax());
00310     
00311     typename AlgebraicSet::Polynomial pol(s);
00312     tensor::bernstein<mmx::GMP::rational> polq(s,bx);
00313 
00314     let::assign(m_polynomial.rep(),polq);
00315 
00316     Solver::edge_point(this->s_intersections, m_polynomial, Solver::south_edge, b);
00317     Solver::edge_point(this->e_intersections, m_polynomial, Solver::east_edge , b);
00318     Solver::edge_point(this->n_intersections, m_polynomial, Solver::north_edge, b);
00319     Solver::edge_point(this->w_intersections, m_polynomial, Solver::west_edge , b);
00320 
00321     Solver::extremal(this->m_singular, pol, b);
00322     foreach(Point* p,this-> m_singular)
00323         std::cout<<"**extremal point: "<<p->x()<<" "<<p->y() <<std::endl;
00324 }

bcell2d_algebraic_curve ( const typename AlgebraicSet::Polynomial p,
const BoundingBox b 
) [inline]

Definition at line 266 of file bcell2d_algebraic_curve.hpp.

References mmx::assign(), bcell2d< C, REF_OF(V) >::e_intersections, solver_implicit< C, V >::east_edge, solver_implicit< C, V >::edge_point(), solver_implicit< C, V >::extremal(), bcell2d_algebraic_curve< C, V >::m_polynomial, bcell2d< C, REF_OF(V) >::m_singular, bcell2d< C, REF_OF(V) >::n_intersections, solver_implicit< C, V >::north_edge, bcell2d< C, REF_OF(V) >::s_intersections, solver_implicit< C, V >::south_edge, bcell2d< C, REF_OF(V) >::w_intersections, solver_implicit< C, V >::west_edge, bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), and bounding_box< C, V >::ymin().

00266                                                                                             : bcell2d<C,REF>(b)
00267 {
00268     //std::cout<<"Alegbraic bcell: "<<p<<std::endl;
00269     Seq<mmx::GMP::rational> bx;
00270     bx<<as<mmx::GMP::rational>(b.xmin());
00271     bx<<as<mmx::GMP::rational>(b.xmax());
00272     bx<<as<mmx::GMP::rational>(b.ymin());
00273     bx<<as<mmx::GMP::rational>(b.ymax());
00274     
00275     tensor::bernstein<mmx::GMP::rational> polq(p.rep(),bx);
00276 
00277     let::assign(m_polynomial.rep(),polq);
00278 
00279     Solver::edge_point(this->n_intersections, m_polynomial, Solver::north_edge, b);
00280     Solver::edge_point(this->s_intersections, m_polynomial, Solver::south_edge, b);
00281     Solver::edge_point(this->w_intersections, m_polynomial, Solver::west_edge , b);
00282     Solver::edge_point(this->e_intersections, m_polynomial, Solver::east_edge , b);
00283 
00284     Solver::extremal(this->m_singular, p, b);
00285 
00286     // foreach(Point* p,this-> s_intersections)
00287     //   std::cout<<"s_ boundary point: "<<p->x()<<", "<<p->y() <<std::endl;
00288     // foreach(Point* p,this-> e_intersections)
00289     //   std::cout<<"e_ boundary point: "<<p->x()<<", "<<p->y() <<std::endl;
00290     // foreach(Point* p,this-> n_intersections)
00291     //   std::cout<<"n_ boundary point: "<<p->x()<<", "<<p->y() <<std::endl;
00292     // foreach(Point* p,this-> w_intersections)
00293     //   std::cout<<"w_ boundary point: "<<p->x()<<", "<<p->y() <<std::endl;
00294 
00295     // foreach(Point* p,this-> m_singular)
00296     //   std::cout<<"extremal point: "<<p->x()<<", "<<p->y() <<std::endl;
00297 
00298     //std::cout<<"Found "<<this->nb_intersect()<<" boundary and "<<this->m_singular.size()<<" extremal points" <<std::endl;
00299 }

bcell2d_algebraic_curve ( AlgebraicCurve cv,
const BoundingBox x 
) [inline]

Definition at line 328 of file bcell2d_algebraic_curve.hpp.

References algebraic_set< C, V >::equation(), and SELF.

00329 {
00330     new (this) SELF(cv->equation(),b );
00331 }

bcell2d_algebraic_curve ( const bcell2d_algebraic_curve< C, V > &  cl  )  [inline]

Definition at line 197 of file bcell2d_algebraic_curve.hpp.

00198         : bcell2d<C,REF>(cl.boundingBox()), m_polynomial(cl.m_polynomial) {}


Member Function Documentation

BoundingBox boundingBox (  )  const [inline, inherited]

Definition at line 71 of file cell.hpp.

00071 { return (BoundingBox)*this; }

void connect0 ( bcell2d< C , REF_OF(V) > *  a,
bcell2d< C , REF_OF(V) > *  b 
) [inline, inherited]
void connect1 ( bcell2d< C , REF_OF(V) > *  a,
bcell2d< C , REF_OF(V) > *  b 
) [inline, inherited]
bool contains ( double  x,
double  y,
double  z,
bool  strict = false 
) [inline, inherited]

Definition at line 226 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, bounding_box< C, V >::m_xmin, bounding_box< C, V >::m_ymax, bounding_box< C, V >::m_ymin, bounding_box< C, V >::m_zmax, and bounding_box< C, V >::m_zmin.

00227 {
00228     if(!strict)
00229         return (((m_xmin <= x) && (x <= m_xmax))
00230                 &&   ((m_ymin <= y) && (y <= m_ymax))
00231                 &&   ((m_zmin <= z) && (z <= m_zmax)))  ;
00232     else
00233         return (((m_xmin <  x) && (x <  m_xmax))
00234                 &&   ((m_ymin <  y) && (y <  m_ymax))
00235                 &&   ((m_zmin <  z) && (z <  m_zmax)))  ;
00236 }

bool contains ( double  x,
double  y,
bool  strict = false 
) [inline, inherited]

Definition at line 215 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, bounding_box< C, V >::m_xmin, bounding_box< C, V >::m_ymax, and bounding_box< C, V >::m_ymin.

00216 {
00217     if(!strict)
00218         return (((m_xmin <= x) && (x <= m_xmax))
00219                 &&   ((m_ymin <= y) && (y <= m_ymax))) ;
00220     else
00221         return (((m_xmin <  x) && (x <  m_xmax))
00222                 &&   ((m_ymin <  y) && (y <  m_ymax))) ;
00223 }

bool contains ( double  x,
bool  strict = false 
) [inline, inherited]

Definition at line 206 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, and bounding_box< C, V >::m_xmin.

00207 {
00208     if(!strict)
00209         return (((m_xmin <= x) && (x <= m_xmax))) ;
00210     else
00211         return (((m_xmin <  x) && (x <  m_xmax))) ;
00212 }

void disconnect (  )  [inline, inherited]
Polynomial equation ( void   )  [inline]

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 200 of file bcell2d_algebraic_curve.hpp.

References bcell2d_algebraic_curve< C, V >::m_polynomial.

00200 { return  m_polynomial; }

bcell2d_algebraic_curve< C, V >::Vector gradient ( const Point p  )  [inline]

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 575 of file bcell2d_algebraic_curve.hpp.

References mmx::diff(), bcell2d_algebraic_curve< C, V >::m_polynomial, bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), and bounding_box< C, V >::ymin().

Referenced by bcell2d_algebraic_curve< C, V >::pair().

00575                              {
00576     Polynomial
00577             dx= diff(m_polynomial,0),
00578             dy= diff(m_polynomial,1);
00579     double
00580             u0= (p[0]-this->xmin())/(this->xmax()-this->xmin()),
00581             u1= (p[1]-this->ymin())/(this->ymax()-this->ymin());
00582     Vector v;
00583     v[0] = dx(u0,u1);
00584     v[1] = dy(u0,u1);
00585     return v;
00586 }

bool insert_regular ( Topology t  )  [inline, virtual]

Implements bcell< C, REF_OF(REF_OF(V)) >.

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 393 of file bcell2d_algebraic_curve.hpp.

References point< C, N, V >::dist2(), bcell2d< C, REF_OF(V) >::e_intersections, Seq< C, R >::erase(), topology< C, V >::insert(), topology< C, V >::insert_edge(), bcell2d_algebraic_curve< C, V >::m_boundary, bcell2d< C, REF_OF(V) >::m_singular, bcell2d< C, REF_OF(V) >::n_intersections, bcell2d_algebraic_curve< C, V >::pair(), mmx::shape::print(), Seq< C, R >::rep(), Seq< C, R >::reversed(), bcell2d< C, REF_OF(V) >::s_intersections, Seq< C, R >::search(), sgn(), Seq< C, R >::size(), and bcell2d< C, REF_OF(V) >::w_intersections.

00393                                 {
00394     //Mesher2d* s= dynamic_cast<Mesher2d*>(t);
00395 
00396     int  sgn(1);
00397     Point *p,*q;
00398 
00399     //std::cout<<"alg. curve, inserting regular "<< *this <<std::endl;
00400 
00401     Scalar eps = 1e-10;//Solver::precision;
00402 
00403 
00404     foreach(Point* pt, this->s_intersections) {
00405       m_boundary<<pt;
00406     }
00407 
00408     if(this->s_intersections.size()>0) q=this->s_intersections.rep().back(); else q=NULL;
00409     foreach(Point* pt, this->e_intersections) {
00410       if(q && pt->dist2(*q) < eps) { 
00411         q=pt; 
00412       } else {
00413         m_boundary<<pt;
00414       }
00415     }
00416 
00417     if(this->e_intersections.size()>0) q=this->e_intersections.rep().back(); else q=NULL;
00418     foreach(Point* pt, this->n_intersections.reversed()) {
00419       if(q && pt->dist2(*q) < eps) { 
00420         q=pt; 
00421       } else {
00422         m_boundary<<pt;
00423       }
00424     }
00425 
00426     if(this->n_intersections.size()>0) q=this->n_intersections.rep().front(); else q=NULL;
00427     foreach(Point* pt, this->w_intersections.reversed()) {
00428       if(q && pt->dist2(*q) < eps) {
00429         q=pt; 
00430       } else {
00431         m_boundary<<pt;
00432       }
00433     }
00434 
00435     //l= this->intersections();
00436     //ni=l.size();
00437     Seq<Point*> l=m_boundary;
00438 
00439 //    if( l.size() !=2) {
00440 //        foreach( Point* e, l)
00441 //            std::cout<<"("<< e->x()<<", "<<e->y()<<") ";
00442 //        std::cout<<std::endl;
00443 //    }
00444 
00445     if (l.size()==1 || l.size()==3) {
00446       //t->insert((BoundingBox*)this,false);
00447     }
00448     if(this->m_singular.size()==0)
00449     {
00450         foreach(Point* v, l) t->insert(v);
00451 
00452         if (l.size() ==2)
00453             t->insert_edge(l[0],l[1]);
00454         else {
00455             while (l.size()>1)
00456             {
00457                 //std::cout<<"L = "<< l <<std::endl;
00458                 p= l[0];
00459                 q= this->pair(p,sgn);
00460                 l.erase(0);
00461                 //std::cout<<"erased "<< p <<" "<<std::endl;int k=l.search(q);
00462                 l.erase( l.search(q) );
00463                 //std::cout<<"erased "<< q <<" ~"<<k<<std::endl;
00464                 t->insert_edge(p,q);
00465                 //std::cout<<"edge "<<0<<" "<<q<<std::endl;
00466                 //std::cout<<"l.size()="<<l.size() <<std::endl;
00467             }
00468             if (l.size()>0) {
00469                 //t->insert((BoundingBox*)this,false);
00470                 print(this);
00471                 std::cout<< "Warning: point "<<*(l[0])<<" not used"<< std::endl;
00472             }
00473         }
00474     }
00475     else
00476     {
00477         std::cout<<"Singular:"<<std::endl;
00478         //std::cout<<this<<std::endl;
00479         t->insert((BoundingBox*)this,false);
00480 
00481         Point *c=this->m_singular[0];
00482         //s->m_specials<<c;
00483         t->insert(c);
00484         foreach(Point* p, this->n_intersections) t->insert_edge(p,c);
00485         foreach(Point* p, this->e_intersections) t->insert_edge(p,c);
00486         foreach(Point* p, this->s_intersections) t->insert_edge(p,c);
00487         foreach(Point* p, this->w_intersections) t->insert_edge(p,c);
00488     }
00489 
00490     //std::cout<<"ok "<<std::endl;
00491 
00492     return true;
00493 
00494 }

bool insert_singular ( Topology t  )  [inline, virtual]

Implements bcell< C, REF_OF(REF_OF(V)) >.

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 497 of file bcell2d_algebraic_curve.hpp.

References bcell2d< C, REF_OF(V) >::e_intersections, Seq< C, R >::erase(), topology< C, V >::insert(), topology< C, V >::insert_edge(), bcell2d< C, REF_OF(V) >::m_singular, bcell2d< C, REF_OF(V) >::n_intersections, bcell2d_algebraic_curve< C, V >::pair(), bcell2d< C, REF_OF(V) >::s_intersections, Seq< C, R >::search(), sgn(), Seq< C, R >::size(), and bcell2d< C, REF_OF(V) >::w_intersections.

00497                                  {
00498 
00499     //  std::cout<<"Singular!!"<<std::endl;
00500 
00501     //Mark singular box with a cross
00502     //t->insert((BoundingBox*)this,true);return true;
00503     
00504     //Mesher2d* s = dynamic_cast<Mesher2d*>(t);
00505 
00506     int sgn(1);
00507 
00508     Seq<Point*> l;
00509     foreach(Point* p, this->n_intersections) {
00510         t->insert(p); l<<p;
00511         //qDebug()<<"Point idx:"<<p->index();
00512     }
00513     foreach(Point* p, this->e_intersections) {
00514         t->insert(p); l<<p;
00515         //qDebug()<<"Point idx:"<<p->index();
00516     }
00517     foreach(Point* p, this->s_intersections) {
00518         t->insert(p); l<<p;
00519         //qDebug()<<"Point idx:"<<p->index();
00520     }
00521     foreach(Point* p, this->w_intersections) {
00522         t->insert(p); l<<p;
00523         //qDebug()<<"Point idx:"<<p->index();
00524     }
00525     int ni=l.size();
00526     
00527     if(this->m_singular.size()==1) {
00528 
00529         //std::cout<<"Singular:"<<std::endl;
00530         //std::cout<<this<<std::endl;
00531         //t->insert((BoundingBox*)this,false);
00532 
00533         Point *c=this->m_singular[0];
00534         //s->m_specials<<c;
00535         //qDebug()<<"Point"<<c->index();
00536         t->insert(c);
00537         foreach(Point* p, this->n_intersections) t->insert_edge(p,c);
00538         foreach(Point* p, this->e_intersections) t->insert_edge(p,c);
00539         foreach(Point* p, this->s_intersections) t->insert_edge(p,c);
00540         foreach(Point* p, this->w_intersections) t->insert_edge(p,c);
00541         return true;
00542     }
00543     else   // no singular points in the bcell
00544     {
00545         if(ni==2) { // 2 points on the boundary
00546             t->insert_edge(l[0],l[1]);
00547             return true;
00548         }
00549         else // more than one branch in the bcell
00550         {
00551             Point *p,*q;
00552             while (l.size()>0)
00553             {
00554                 p= l[0];
00555                 q= this->pair(p,sgn);
00556                 l.erase(0);
00557                 l.erase( l.search(q) );
00558                 t->insert_edge(p,q);
00559             }
00560         }
00561     }
00562     
00563     //std::cout<<"singular bcell with "<<ni<<" bpts "<<this->m_singular.size()<<" epts"<<std::endl;
00564 
00565     return true;
00566 }

bounding_box< C, V > * intersect ( const bounding_box< C, V > &  other  )  [inline, inherited]

Definition at line 319 of file bounding_box.hpp.

References mmx::shape::mmxmax(), mmx::shape::mmxmin(), SELF, bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

Referenced by bounding_box< double, V >::operator*().

00319                                  {
00320     SELF * bcell = new SELF ;
00321     bcell->set_xmin(mmxmax(this->xmin(), other.xmin())) ;
00322     bcell->set_xmax(mmxmin(this->xmax(), other.xmax())) ;
00323     bcell->set_ymin(mmxmax(this->ymin(), other.ymin())) ;
00324     bcell->set_ymax(mmxmin(this->ymax(), other.ymax())) ;
00325     bcell->set_zmin(mmxmax(this->zmin(), other.zmin())) ;
00326     bcell->set_zmax(mmxmin(this->zmax(), other.zmax())) ;
00327     return bcell ;
00328 }

void intersected ( bounding_box< C, V > *  other  )  [inline, inherited]
virtual Seq<Point *> intersections ( int  i  )  const [inline, virtual, inherited]

Definition at line 98 of file bcell2d.hpp.

References bcell2d< C, V >::e_intersections, bcell2d< C, V >::n_intersections, Seq< C, R >::reversed(), bcell2d< C, V >::s_intersections, and bcell2d< C, V >::w_intersections.

00098                                                  {
00099       switch(i) {
00100       case 0:
00101           return s_intersections;
00102       case 1:
00103           return e_intersections;
00104       case 2:
00105           return n_intersections.reversed();
00106       case 3:
00107           return w_intersections.reversed();
00108       default:
00109           return (Seq<Point *>());
00110       }
00111 
00112   }

virtual Seq<Point *> intersections (  )  const [inline, virtual, inherited]

Definition at line 84 of file bcell2d.hpp.

References bcell2d< C, V >::e_intersections, bcell2d< C, V >::n_intersections, Seq< C, R >::reversed(), bcell2d< C, V >::s_intersections, and bcell2d< C, V >::w_intersections.

Referenced by bcell2d_voronoi_site2d< C, V >::pair(), bcell2d_algebraic_curve< C, V >::pair(), bcell2d_voronoi_site2d< C, V >::starting_point(), and bcell2d_algebraic_curve< C, V >::starting_point().

00084                                             {
00085 //      std::cout<<"Intersection "
00086 //              << this->n_intersections.size()<<" "
00087 //              << this->s_intersections.size()<<" "
00088 //              << this->e_intersections.size()<<" "
00089 //              << this->w_intersections.size()<<std::endl;
00090       Seq<Point *> r;
00091       r<< this->s_intersections;
00092       r<< this->e_intersections;
00093       r<< this->n_intersections.reversed();
00094       r<< this->w_intersections.reversed();
00095   return ( r ); 
00096   }

bool intersects ( bounding_box< C, V > *  other,
bool  strict = true 
) [inline, inherited]

Definition at line 239 of file bounding_box.hpp.

References bounding_box< C, V >::is0D(), bounding_box< C, V >::is1D(), bounding_box< C, V >::is2D(), bounding_box< C, V >::is3d(), mmx::shape::mmxmax(), mmx::shape::mmxmin(), bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00240 {
00241     if(this->is0D())
00242         return (this->xmin() == other->xmin()) ;
00243     else if(this->is1D())
00244         if(strict)
00245             return ((mmxmax(this->xmin(), other->xmin()) <  mmxmin(this->xmax(), other->xmax()))) ;
00246         else
00247             return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax()))) ;
00248     else if(this->is2D())
00249         if(strict)
00250             return ((mmxmax(this->xmin(), other->xmin()) <  mmxmin(this->xmax(), other->xmax())) &&
00251                     (mmxmax(this->ymin(), other->ymin()) <  mmxmin(this->ymax(), other->ymax()))) ;
00252         else
00253             return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax())) &&
00254                     (mmxmax(this->ymin(), other->ymin()) <= mmxmin(this->ymax(), other->ymax()))) ;
00255     else if(this->is3d()) {
00256         if(strict)
00257             return ((mmxmax(this->xmin(), other->xmin()) <  mmxmin(this->xmax(), other->xmax())) &&
00258                     (mmxmax(this->ymin(), other->ymin()) <  mmxmin(this->ymax(), other->ymax())) &&
00259                     (mmxmax(this->zmin(), other->zmin()) <  mmxmin(this->zmax(), other->zmax()))) ;
00260         else
00261             return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax())) &&
00262                     (mmxmax(this->ymin(), other->ymin()) <= mmxmin(this->ymax(), other->ymax())) &&
00263                     (mmxmax(this->zmin(), other->zmin()) <= mmxmin(this->zmax(), other->zmax()))) ;
00264     }
00265     return false ;
00266 }

bool is0D ( void   )  const [inline, inherited]

Definition at line 80 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersects(), and bounding_box< C, V >::unites().

00080 { return ((m_xmin == m_xmax) && (m_ymin == m_ymax) && (m_zmin == m_zmax)) ; }

bool is1D ( void   )  const [inline, inherited]

Definition at line 81 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersects(), and bounding_box< C, V >::unites().

00081 { return ((m_xmin != m_xmax) && (m_ymin == m_ymax) && (m_zmin == m_zmax)) ; }

bool is2D ( void   )  const [inline, inherited]

Definition at line 82 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersects(), and bounding_box< C, V >::unites().

00082 { return ((m_xmin != m_xmax) && (m_ymin != m_ymax) && (m_zmin == m_zmax)) ; }

bool is3d ( void   )  const [inline, inherited]

Definition at line 83 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersects(), and bounding_box< C, V >::unites().

00083 { return ((m_xmin != m_xmax) && (m_ymin != m_ymax) && (m_zmin != m_zmax)) ; }

bool is_active ( void   )  [inline, virtual]

Implements cell< C, V >.

Reimplemented in bcell2d_semialgebraic_curve< C, V >, and bcell2d_voronoi_site2d< C, V >.

Definition at line 382 of file bcell2d_algebraic_curve.hpp.

References mmx::has_sign_variation(), and bcell2d_algebraic_curve< C, V >::m_polynomial.

00382                 {
00383 
00384     return (has_sign_variation(this->m_polynomial));
00385 
00386     //   if(this->m_singular.size()>0)
00387     //       return true;
00388     //     return (this->nb_intersect()>0);
00389 }

bool is_border ( void   )  const [inline, inherited]

Definition at line 114 of file bcell2d.hpp.

References bcell2d< C, V >::e_neighbors, bcell2d< C, V >::n_neighbors, bcell2d< C, V >::s_neighbors, Seq< C, R >::size(), and bcell2d< C, V >::w_neighbors.

00114                                     {
00115       return (  this->s_neighbors.size()==0 ||
00116                 this->e_neighbors.size()==0 ||
00117                 this->n_neighbors.size()==0 ||
00118                 this->w_neighbors.size()==0  );
00119   }

bool is_corner ( void   )  const [inherited]
bool is_intersected ( void   )  [inline, virtual]

Implements bcell< C, REF_OF(REF_OF(V)) >.

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 204 of file bcell2d_algebraic_curve.hpp.

References bcell2d< C, REF_OF(V) >::nb_intersect().

00204 { return (this->nb_intersect()>0); };

bool is_regular ( void   )  [inline, virtual]

Implements cell< C, V >.

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 335 of file bcell2d_algebraic_curve.hpp.

References mmx::diff(), mmx::has_sign_variation(), bcell2d_algebraic_curve< C, V >::m_polynomial, bcell2d< C, REF_OF(V) >::m_singular, bcell2d< C, REF_OF(V) >::nb_intersect(), and Seq< C, R >::size().

Referenced by bcell2d_semialgebraic_curve< C, V >::is_active().

00335                  {
00336     // Assumption: bcells with extremal points (dx=dy=0) that do not belong on the curve do not intersect the curve (assumes deep enough subdivision)
00337 
00338     if(this->m_singular.size()>1) return false;
00339 
00340     //    if (0)
00341     if (this->m_singular.size()==0) {
00342         if(!has_sign_variation(m_polynomial)) return true;
00343 
00344         Polynomial dx= diff(m_polynomial,0);
00345         if(!has_sign_variation(dx)) return true;
00346 
00347         Polynomial dy= diff(m_polynomial,1);
00348         if(!has_sign_variation(dy)) return true;
00349 
00350         int n= this->nb_intersect();
00351         return   ( n==2 );
00352         //return   ( n%2==0);
00353         //return   (n == 4 || n == 2 || n == 0 );
00354     }
00355 
00356     //return true;
00357 
00358     //--------------------------------------------------------------------
00359     if(this->m_singular.size()==1) {
00360         //    Polynomial
00361         //      dxf = diff(m_polynomial,0),
00362         //      dyf = diff(m_polynomial,1);
00363         //       std::cout<< "__________________"<<std::endl;
00364         //       std::cout<< m_polynomial;std::cout<< std::endl;
00365         //       std::cout<< "__________________"<<std::endl;
00366         //       std::cout<< dxf;std::cout<< std::endl;
00367         //       std::cout<< "__________________"<<std::endl;
00368         //       std::cout<< dyf;std::cout<< std::endl;
00369         //       std::cout<< "__________________"<<std::endl;
00370 
00371         //      int d;
00372         //      d = 1-2*topological_degree(dxf,dyf);
00373         //      d = 0;
00374         return false; //(d==ni);
00375     }
00376     
00377     return true;
00378 }

void join0 ( bcell2d< C , REF_OF(V) > *  b  )  [inline, inherited]
void join1 ( bcell2d< C , REF_OF(V) > *  b  )  [inline, inherited]
virtual unsigned nb_intersect ( void   )  const [inline, virtual, inherited]
virtual bcell2d* neighbor ( Point *  p  )  [inline, virtual, inherited]

Definition at line 167 of file bcell2d.hpp.

References bcell2d< C, V >::e_intersections, bcell2d< C, V >::e_neighbors, Seq< C, R >::member(), bcell2d< C, V >::n_intersections, bcell2d< C, V >::n_neighbors, bcell2d< C, V >::s_intersections, bcell2d< C, V >::s_neighbors, bcell2d< C, V >::w_intersections, and bcell2d< C, V >::w_neighbors.

00167                                          {
00168       foreach( bcell2d *c, this->s_neighbors     )
00169           if ( c->n_intersections.member(p) )
00170           { 
00171               return c;
00172           }
00173       foreach( bcell2d *c, this->e_neighbors     )
00174           if ( c->w_intersections.member(p) )
00175           { 
00176               return c;
00177           }
00178       foreach( bcell2d *c, this->n_neighbors     )
00179           if ( c->s_intersections.member(p) )
00180           { 
00181               return c;
00182           }
00183       foreach( bcell2d *c, this->w_neighbors     )
00184           if ( c->e_intersections.member(p) )
00185           { 
00186               return c;
00187           }
00188 
00189       // Point p on boundary.
00190       //std::cout<<"... Point ("<<p->x()<<","<<p->y()<<") not found on neighbors of "<< this<<"("<<this->neighbors().size() <<")"<<std::endl; 
00191       return NULL;
00192   }

virtual Seq<bcell2d *> neighbors (  )  [inline, virtual, inherited]

Definition at line 154 of file bcell2d.hpp.

References bcell2d< C, V >::e_neighbors, bcell2d< C, V >::n_neighbors, bcell2d< C, V >::s_neighbors, and bcell2d< C, V >::w_neighbors.

00154                                         {
00155       Seq<bcell2d *> r;
00156       r<< this->s_neighbors; 
00157       r<< this->e_neighbors; 
00158       r<< this->n_neighbors; 
00159       r<< this->w_neighbors;
00160   return ( r ); }

double & operator() ( unsigned  v,
unsigned  s 
) [inline, inherited]

Definition at line 356 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, bounding_box< C, V >::m_xmin, bounding_box< C, V >::m_ymax, bounding_box< C, V >::m_ymin, bounding_box< C, V >::m_zmax, and bounding_box< C, V >::m_zmin.

00356                                        {
00357     switch(v) {
00358     case 0:
00359         if(s==0) return m_xmin; else return m_xmax;
00360     case 1:
00361         if(s==0) return m_ymin; else return m_ymax;
00362     default:
00363         if(s==0) return m_zmin; else return m_zmax;
00364     }
00365 
00366 }

double operator() ( unsigned  v,
unsigned  s 
) const [inline, inherited]

Definition at line 343 of file bounding_box.hpp.

References bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00343                                              {
00344     switch(v) {
00345     case 0:
00346         if(s==0) return xmin(); else return xmax();
00347     case 1:
00348         if(s==0) return ymin(); else return ymax();
00349     default:
00350         if(s==0) return zmin(); else return zmax();
00351     }
00352 
00353 }

bounding_box<C,V>* operator* ( const bounding_box< C, V > &  other  )  [inline, inherited]

Definition at line 103 of file bounding_box.hpp.

00103 { return intersect(other) ; }

bounding_box<C,V>* operator+ ( const bounding_box< C, V > &  other  )  [inline, inherited]

Definition at line 104 of file bounding_box.hpp.

00104 { return     unite(other) ; }

virtual Point* pair ( Point *  p,
int &  sgn 
) [pure virtual, inherited]
bcell2d_algebraic_curve< C, V >::Point * pair ( typename bcell2d_algebraic_curve< C, V >::Point p,
int &  sgn 
) [inline, virtual]

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 647 of file bcell2d_algebraic_curve.hpp.

References mmx::abs(), bcell2d< C, REF_OF(V) >::e_intersections, bcell2d_algebraic_curve< C, V >::gradient(), bcell2d< C, REF_OF(V) >::intersections(), bcell2d_algebraic_curve< C, V >::m_polynomial, bcell2d< C, REF_OF(V) >::m_singular, bcell2d< C, REF_OF(V) >::s_intersections, Seq< C, R >::search(), Seq< C, R >::size(), and bcell2d< C, REF_OF(V) >::w_intersections.

Referenced by bcell2d_algebraic_curve< C, V >::insert_regular(), and bcell2d_algebraic_curve< C, V >::insert_singular().

00647                                             {
00648      // Pair: returns a neighboring point on the component (p,sgn)
00649      // The candidates are the 2 neighbor intersections of p in *this
00650 
00651       Seq<Point*> all;
00652       int a;
00653       all= this->intersections();
00654       a   = all.size();
00655       if (a==2)// regular bcell with a single branch
00656          { return (all[0]==p ? all[1]: all[0]);  }
00657       if (a==1)
00658       { 
00659         std::cout<<"Only 1 intersection point in "<< *this <<" (i.e."<<*all[0] <<")"<<std::endl;
00660         return (p); 
00661       }
00662 
00663       int
00664           s=this->s_intersections.size() ,// ~0
00665           e=this->e_intersections.size() ,// ~1
00666           //n=this->n_intersections.size() ,// ~2
00667           w=this->w_intersections.size() ;// ~3
00668 
00669       int j,k,i= all.search(p);        
00670     
00671 
00672       if (this->m_singular.size()==0  )    { 
00673 
00674         Vector grq, grp = this->gradient(*p);       
00675         foreach(Point* q, all)
00676           if ( q != p) 
00677           {
00678             grq = this->gradient(*q);
00679             if(grp[0]*grq[0]>0  && grp[1]*grq[1]>0 ) return (q);
00680           }
00681 
00682         //box has 2 or more "identical" branches
00683 
00684         //p is part of critical branch
00685 
00686         std::cout<<"...maybe pair Trouble (1)"<< this<<std::endl; 
00687 
00688         for (int v=0;v<a;v++)
00689             for (int w=v+1;w<a;v++)
00690             {
00691                 grp= this->gradient(*all[v]);
00692                 grq= this->gradient(*all[w]);
00693                 if( grp[0]*grq[0]>0  && grp[1]*grq[1]>0 )
00694                 {
00695                     for (int u=0; u<a;u++)
00696                         if ( u!=v && u!=w && all[u]!=p )
00697                             return (all[u]);
00698                 }                
00699             }
00700         
00701         std::cout<<"empty BOX:("<<this->m_singular.size()<<",a="<<a<<")"<<this <<std::endl;         
00702         foreach(Point*v,all) {
00703             Vector gr= this->gradient(*v);
00704             //std::cout<<"("<<v->x()<<","<<v->y()<<"): ";
00705             std::cout<<(gr[0]>0?1:-1)<<","<<(gr[1]>0?1:-1) <<std::endl;
00706         }
00707         
00708         //look non-tangent direction
00709         foreach(Point* q, all)
00710           if ( q != p) 
00711           {
00712             grq = this->gradient(*q);
00713             if( abs(grp[0]) < 0.017)
00714             { if (grp[1]*grq[1]>0)
00715                 return (q);
00716             }
00717             else if ( abs(grp[1])< 0.01)
00718             { if (grp[0]*grq[0]>0)
00719                 return (q);
00720             }
00721           }
00722         
00723         std::cout<<"...pair Trouble (2)"<< this<<std::endl; 
00724 
00725         return (all[0]);
00726 
00727     }
00728        else {//singular box
00729 
00730            //std::cout<< "SBOX: " <<this <<std::endl;
00731            //std::cout<< "      " <<all <<std::endl;
00732            //for (unsigned y=0;y<4;y++)
00733            //std::cout<<y <<": ("<<all[y]->x()<<","<<all[y]->y()<<")"<<std::endl;
00734 
00735       // Cell with 1 self-intersection
00736       int ev(0);
00737       int u, v;//side of p, ln resp.
00738       j= ( i!=0   ? i-1 : a-1 );
00739       k= ( i!=a-1 ? i+1 : 0   );
00740 
00741       //std::cout<<"j,i,k (left,p,right)="<<j <<" "<<i << " "<<k<< std::endl; 
00742 
00743       Point *ln= all[j], 
00744             *rn= all[k] ;
00745 
00746       //std::cout<<"i= "<< i<<", j=" <<j<< std::endl; 
00747       // std::cout<<"("<<a<<")"<<s<<", "<<e<<", "<<n<<", "<<w<< std::endl; 
00748 
00749       u= ( i<s   ? 0 :
00750            ( i<s+e ? 1 :
00751              ( i<a-w ? 2 :
00752                3 )));
00753       v= ( j<s   ? 0 :
00754            ( j<s+e ? 1 :
00755              ( j<a-w ? 2 :
00756                3 )));
00757 
00758       int * sz = this->m_polynomial.rep().szs();
00759       int * st = this->m_polynomial.rep().str();
00760       
00761       switch (u){
00762       case 0:
00763         ev= (this->m_polynomial[0] >0 ? 1:-1);
00764         if (v==0 && j%2==0) // p, ln on the same face
00765           ev*=-1;
00766         break;
00767       case 1:
00768         ev= (this->m_polynomial[(sz[0]-1)*st[0]] >0 ? 1:-1);      
00769         if (v==1 && (j-s)%2==0) // p, ln on the same face
00770           ev*=-1;
00771         break;
00772       case 2:
00773         ev= (this->m_polynomial[sz[0]*sz[1]-1]>0 ? 1:-1);
00774         if (v==2 && (j-s-e)%2==0) // p, ln on the same face
00775           ev*=-1;
00776         break;
00777       case 3:
00778         ev= (this->m_polynomial[(sz[1]-1)*st[1]] >0 ? 1:-1);
00779         if (v==3 && (j-a+w)%2==0) // p, ln on the same face
00780           ev*=-1;
00781         break;
00782       }
00783 
00784       // std::cout<<"Cell"<<this <<"("<<(sgn==1 ? "+": "-")<<")" <<std::endl;
00785       // std::cout<<"u= "<< u<<", v=" <<v<<", ev=" <<ev << std::endl; 
00786       // std::cout<<"ln= "<< ln->x()<<","<<ln->y() << std::endl; 
00787       // std::cout<<"p = "<< p->x()<<","<<p->y() << std::endl; 
00788       // std::cout<<"rn= "<< rn->x()<<","<<rn->y() << std::endl; 
00789       // if    (ev*sgn>0)  std::cout<<"result is ln"<< std::endl;
00790       // else              std::cout<<"result is rn"<< std::endl;
00791 
00792 
00793 
00794       if    (ev*sgn>0)  return ln;
00795       else              return rn;
00796       }
00797 }

void set_xmax ( double  x  )  [inline, inherited]

Definition at line 74 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersected(), and bounding_box< C, V >::united().

00074 { this->m_xmax = x ; }

void set_xmin ( double  x  )  [inline, inherited]

Definition at line 73 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersected(), and bounding_box< C, V >::united().

00073 { this->m_xmin = x ; }

void set_ymax ( double  y  )  [inline, inherited]

Definition at line 76 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersected(), and bounding_box< C, V >::united().

00076 { this->m_ymax = y ; }

void set_ymin ( double  y  )  [inline, inherited]

Definition at line 75 of file bounding_box.hpp.

Referenced by bounding_box< C, V >::intersected(), and bounding_box< C, V >::united().

00075 { this->m_ymin = y ; }

void set_zmax ( double  z  )  [inline, inherited]
void set_zmin ( double  z  )  [inline, inherited]
int side ( Point *  p  )  [inline, inherited]

Definition at line 132 of file bcell2d.hpp.

References bcell2d< C, V >::e_intersections, bcell2d< C, V >::intersections(), bcell2d< C, V >::s_intersections, Seq< C, R >::search(), Seq< C, R >::size(), and bcell2d< C, V >::w_intersections.

00132                        {
00133       Seq<Point*> all;
00134       int s,i,a;
00135       s   = s_intersections.size();
00136       all = this->intersections();
00137       a   = all.size();
00138       i   = all.search(p);
00139       if (i==-1) return (-1);
00140       else return
00141          ( i<s                             ? 0 :
00142          ( i<s+(int)e_intersections.size() ? 1 :
00143          ( i<a-(int)w_intersections.size() ? 2 :
00144                                       3 )));
00145   }

double size ( void   )  [inline, inherited]

Definition at line 199 of file bounding_box.hpp.

References bounding_box< C, V >::m_xmax, bounding_box< C, V >::m_xmin, bounding_box< C, V >::m_ymax, bounding_box< C, V >::m_ymin, bounding_box< C, V >::m_zmax, bounding_box< C, V >::m_zmin, and mmx::max().

Referenced by voronoi2dimpl< C, V >::run(), voronoi2d< C, V >::run(), mesher3d_shape< C, V >::run(), mesher3d_algebraic_curve< C, V >::run(), and mesher2d< C, V >::run().

00200 {
00201     //std::cout<<"Size "<<m_xmax<< " "<< m_xmin<<" "<< m_ymax<<" "<< m_ymin<<" "<< m_zmax<< " "<<m_zmin<<std::endl;
00202     return std::max(m_xmax-m_xmin, std::max(m_ymax-m_ymin, m_zmax-m_zmin)) ;
00203 }

virtual void split_position ( int &  v,
double &  t 
) [virtual, inherited]
bcell2d_algebraic_curve< C, V >::Point * starting_point ( int  sgn  )  [inline, virtual]

Implements bcell2d< C, REF_OF(V) >.

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 590 of file bcell2d_algebraic_curve.hpp.

References bcell2d< C, REF_OF(V) >::e_intersections, bcell2d< C, REF_OF(V) >::intersections(), bcell2d_algebraic_curve< C, V >::m_polynomial, bcell2d< C, REF_OF(V) >::s_intersections, Seq< C, R >::size(), and bcell2d< C, REF_OF(V) >::w_intersections.

00590                             {
00591 
00592     //  std::cout<<"startingPoint.AlgCurve"<<std::endl;
00593 
00594     Seq<Point*> l, all;
00595     unsigned a;
00596     all = this->intersections();
00597 
00598     // std::cout<<this<<" , "<<a<<std::endl;
00599     // foreach(Point*p,all)
00600     //   std::cout<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl;
00601 
00602     a = all.size();
00603     if (a==1) return all[0];
00604 
00605     int ev(0);
00606     int u ;//position of p
00607 
00608     unsigned
00609             s=this->s_intersections.size() ,// ~0
00610             e=this->e_intersections.size() ,// ~1
00611             //n=this->n_intersections.size() ,// ~2
00612             w=this->w_intersections.size() ;// ~3
00613 
00614     u= ( 0<s   ? 0 :
00615                  ( 0<s+e ? 1 :
00616                            ( 0<a-w ? 2 :
00617                                      3 )));
00618 
00619     int * sz = this->m_polynomial.rep().szs();
00620     int * st = this->m_polynomial.rep().str();
00621 
00622     switch (u){
00623     case 0:
00624         ev= (this->m_polynomial[0] >0 ? 1:-1);
00625         break;
00626     case 1:
00627         ev= (this->m_polynomial[(sz[0]-1)*st[0]] >0 ? 1:-1);
00628         break;
00629     case 2:
00630         ev= (this->m_polynomial[sz[0]*sz[1]-1]>0 ? 1:-1);
00631         break;
00632     case 3:
00633         ev= (this->m_polynomial[(sz[1]-1)*st[1]] >0 ? 1:-1);
00634         break;
00635     }
00636 
00637     if    (ev*sgn>0)  {
00638         return all[0];
00639     }
00640     else              {
00641         return all[1];
00642     }
00643 }

virtual void subdivide ( bcell< C , REF_OF(REF_OF(V)) > *&  left,
bcell< C , REF_OF(REF_OF(V)) > *&  right,
int  v,
double  s 
) [pure virtual, inherited]
virtual int subdivide ( bcell< C , REF_OF(REF_OF(V)) > *&  left,
bcell< C , REF_OF(REF_OF(V)) > *&  right 
) [virtual, inherited]
void subdivide ( Cell *&  left,
Cell *&  right,
int  v,
double  s 
) [inline, virtual]

Reimplemented in bcell2d_voronoi_site2d< C, V >.

Definition at line 570 of file bcell2d_algebraic_curve.hpp.

References SELF.

00570                                                           {
00571     bcell2d_subdivisor<C,V>::subdivide( *this,(SELF*&)Left,(SELF*&)Right,v,s);
00572 }

bounding_box< C, V > * unite ( bounding_box< C, V > *  other  )  [inline, inherited]

Definition at line 331 of file bounding_box.hpp.

References mmx::shape::mmxmax(), mmx::shape::mmxmin(), SELF, bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

Referenced by bounding_box< double, V >::operator+().

00331                         {
00332     SELF * bcell = new SELF ;
00333     bcell->set_xmin(mmxmin(this->xmin(), other->xmin())) ;
00334     bcell->set_xmax(mmxmax(this->xmax(), other->xmax())) ;
00335     bcell->set_ymin(mmxmin(this->ymin(), other->ymin())) ;
00336     bcell->set_ymax(mmxmax(this->ymax(), other->ymax())) ;
00337     bcell->set_zmin(mmxmin(this->zmin(), other->zmin())) ;
00338     bcell->set_zmax(mmxmax(this->zmax(), other->zmax())) ;
00339     return bcell ;
00340 }

void united ( bounding_box< C, V > *  other  )  [inline, inherited]
bool unites ( bounding_box< C, V > *  other,
bool  strict = true 
) [inline, inherited]

Definition at line 269 of file bounding_box.hpp.

References bounding_box< C, V >::is0D(), bounding_box< C, V >::is1D(), bounding_box< C, V >::is2D(), bounding_box< C, V >::is3d(), mmx::shape::mmxmax(), mmx::shape::mmxmin(), bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().

00270 {
00271     if(this->is0D())
00272         return (this->xmin() == other->xmin()) ;
00273     else if(this->is1D()) {
00274         if(strict)
00275             return ((mmxmin(this->xmin(), other->xmin()) <  mmxmax(this->xmax(), other->xmax()))) ;
00276         else
00277             return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax()))) ;
00278     } else if(this->is2D()) {
00279         if(strict)
00280             return ((mmxmin(this->xmin(), other->xmin()) <  mmxmax(this->xmax(), other->xmax())) &&
00281                     (mmxmin(this->ymin(), other->ymin()) <  mmxmax(this->ymax(), other->ymax()))) ;
00282         else
00283             return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax())) &&
00284                     (mmxmin(this->ymin(), other->ymin()) <= mmxmax(this->ymax(), other->ymax()))) ;
00285     } else if(this->is3d()) {
00286         if(strict)
00287             return ((mmxmin(this->xmin(), other->xmin()) <  mmxmax(this->xmax(), other->xmax())) &&
00288                     (mmxmin(this->ymin(), other->ymin()) <  mmxmax(this->ymax(), other->ymax())) &&
00289                     (mmxmin(this->zmin(), other->zmin()) <  mmxmax(this->zmax(), other->zmax()))) ;
00290         else
00291             return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax())) &&
00292                     (mmxmin(this->ymin(), other->ymin()) <= mmxmax(this->ymax(), other->ymax())) &&
00293                     (mmxmin(this->zmin(), other->zmin()) <= mmxmax(this->zmax(), other->zmax()))) ;
00294     }
00295     return false ;
00296 }

double xmax ( void   )  const [inline, inherited]

Definition at line 63 of file bounding_box.hpp.

00063 { return m_xmax ; }

double xmax ( void   )  [inline, inherited]

Definition at line 56 of file bounding_box.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::bcell2d_algebraic_curve(), bcell3d_algebraic_curve< C, V >::bcell3d_algebraic_curve(), bcell3d_algebraic_surface< C, V >::bcell3d_algebraic_surface(), cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_surface< C, V >::cell3d_algebraic_surface(), cell3d< C, V >::center(), cell2d< C, REF_OF(V) >::center(), bcell3d_algebraic_surface< C, V >::center(), bcell3d< C, V >::center(), bcell2d_voronoi_impl_diagram< C, V >::compute_boundary(), bcell2d_voronoi_diagram< C, V >::compute_boundary(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), cell2d_algebraic_curve< C, V >::gradient(), bcell2d_voronoi_site2d< C, V >::gradient(), bcell2d_voronoi_impl2d< C, V >::gradient(), bcell2d_algebraic_curve< C, V >::gradient(), topology< C, V >::insert(), mesher3d_algebraic_curve< C, V >::insert(), bcell2d_voronoi_impl_diagram< C, V >::insert_regular(), bcell2d_voronoi_diagram< C, V >::insert_regular(), bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), solver_implicit< C, V >::intersection(), bounding_box< C, V >::intersects(), cell3d< C, V >::is_adjacent(), cell2d< C, V >::is_adjacent(), bounding_box< C, V >::operator()(), cell3d_algebraic_surface< C, V >::point(), solver_implicit< C, V >::singular(), cell3d_algebraic_surface< C, V >::split(), bcell3d_algebraic_surface< C, V >::split(), cell3d< C, V >::split_position(), cell2d_algebraic_curve< C, V >::split_position(), bcell3d_list< C, V >::split_position(), bcell3d< C, V >::split_position(), bcell2d_voronoi_impl_diagram< C, V >::split_position(), bcell2d_voronoi_diagram< C, V >::split_position(), bcell2d_list< C, V >::split_position(), bcell2d_intersection< C, V >::split_position(), bcell2d< C, V >::split_position(), bcell3d_algebraic_curve< C, V >::subdivide(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), bcell2d_voronoi_diagram< C, V >::subdivide(), bcell2d_list< C, V >::subdivide(), bcell2d_intersection< C, V >::subdivide(), bcell3d_algebraic_surface< C, V >::topology_regular(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), bounding_box< C, V >::unites(), voronoi_site2d< C, V >::upper_bound(), cell3d_algebraic_surface< C, V >::value(), and EdgeListBuilder< node_t >::verifyFaceList().

00056 { return m_xmax ; }

double xmin ( void   )  const [inline, inherited]

Definition at line 62 of file bounding_box.hpp.

00062 { return m_xmin ; }

double xmin ( void   )  [inline, inherited]

Definition at line 55 of file bounding_box.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::bcell2d_algebraic_curve(), bcell3d_algebraic_curve< C, V >::bcell3d_algebraic_curve(), bcell3d_algebraic_surface< C, V >::bcell3d_algebraic_surface(), cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_surface< C, V >::cell3d_algebraic_surface(), cell3d< C, V >::center(), cell2d< C, REF_OF(V) >::center(), bcell3d_algebraic_surface< C, V >::center(), bcell3d< C, V >::center(), bcell2d_voronoi_impl_diagram< C, V >::compute_boundary(), bcell2d_voronoi_diagram< C, V >::compute_boundary(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), cell2d_algebraic_curve< C, V >::gradient(), bcell2d_voronoi_site2d< C, V >::gradient(), bcell2d_voronoi_impl2d< C, V >::gradient(), bcell2d_algebraic_curve< C, V >::gradient(), topology< C, V >::insert(), mesher3d_algebraic_curve< C, V >::insert(), bcell2d_voronoi_impl_diagram< C, V >::insert_regular(), bcell2d_voronoi_diagram< C, V >::insert_regular(), bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), solver_implicit< C, V >::intersection(), bounding_box< C, V >::intersects(), cell3d< C, V >::is_adjacent(), cell2d< C, V >::is_adjacent(), bounding_box< C, V >::operator()(), mmx::shape::operator<<(), cell3d_algebraic_surface< C, V >::point(), solver_implicit< C, V >::singular(), cell3d_algebraic_surface< C, V >::split(), bcell3d_algebraic_surface< C, V >::split(), cell3d< C, V >::split_position(), cell2d_algebraic_curve< C, V >::split_position(), bcell3d_list< C, V >::split_position(), bcell3d< C, V >::split_position(), bcell2d_voronoi_impl_diagram< C, V >::split_position(), bcell2d_voronoi_diagram< C, V >::split_position(), bcell2d_list< C, V >::split_position(), bcell2d_intersection< C, V >::split_position(), bcell2d< C, V >::split_position(), bcell3d_algebraic_curve< C, V >::subdivide(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), bcell2d_voronoi_diagram< C, V >::subdivide(), bcell2d_list< C, V >::subdivide(), bcell2d_intersection< C, V >::subdivide(), bcell3d_algebraic_surface< C, V >::topology_regular(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), bounding_box< C, V >::unites(), voronoi_site2d< C, V >::upper_bound(), cell3d_algebraic_surface< C, V >::value(), and EdgeListBuilder< node_t >::verifyFaceList().

00055 { return m_xmin ; }

double xsize ( void   )  const [inline, inherited]

Definition at line 69 of file bounding_box.hpp.

00069 { return m_xmax-m_xmin ; }

double ymax ( void   )  const [inline, inherited]

Definition at line 65 of file bounding_box.hpp.

00065 { return m_ymax ; }

double ymax ( void   )  [inline, inherited]

Definition at line 58 of file bounding_box.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::bcell2d_algebraic_curve(), bcell3d_algebraic_curve< C, V >::bcell3d_algebraic_curve(), bcell3d_algebraic_surface< C, V >::bcell3d_algebraic_surface(), cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_surface< C, V >::cell3d_algebraic_surface(), cell3d< C, V >::center(), cell2d< C, REF_OF(V) >::center(), bcell3d_algebraic_surface< C, V >::center(), bcell3d< C, V >::center(), bcell2d_voronoi_impl_diagram< C, V >::compute_boundary(), bcell2d_voronoi_diagram< C, V >::compute_boundary(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), cell2d_algebraic_curve< C, V >::gradient(), bcell2d_voronoi_site2d< C, V >::gradient(), bcell2d_voronoi_impl2d< C, V >::gradient(), bcell2d_algebraic_curve< C, V >::gradient(), topology< C, V >::insert(), mesher3d_algebraic_curve< C, V >::insert(), bcell2d_voronoi_impl_diagram< C, V >::insert_regular(), bcell2d_voronoi_diagram< C, V >::insert_regular(), bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), solver_implicit< C, V >::intersection(), bounding_box< C, V >::intersects(), cell3d< C, V >::is_adjacent(), cell2d< C, V >::is_adjacent(), bounding_box< C, V >::operator()(), cell3d_algebraic_surface< C, V >::point(), solver_implicit< C, V >::singular(), cell3d_algebraic_surface< C, V >::split(), bcell3d_algebraic_surface< C, V >::split(), cell3d< C, V >::split_position(), cell2d_algebraic_curve< C, V >::split_position(), bcell3d_list< C, V >::split_position(), bcell3d< C, V >::split_position(), bcell2d_voronoi_impl_diagram< C, V >::split_position(), bcell2d_voronoi_diagram< C, V >::split_position(), bcell2d_list< C, V >::split_position(), bcell2d_intersection< C, V >::split_position(), bcell2d< C, V >::split_position(), bcell3d_algebraic_curve< C, V >::subdivide(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), bcell2d_voronoi_diagram< C, V >::subdivide(), bcell2d_list< C, V >::subdivide(), bcell2d_intersection< C, V >::subdivide(), bcell3d_algebraic_surface< C, V >::topology_regular(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), bounding_box< C, V >::unites(), voronoi_site2d< C, V >::upper_bound(), cell3d_algebraic_surface< C, V >::value(), and EdgeListBuilder< node_t >::verifyFaceList().

00058 { return m_ymax ; }

double ymin ( void   )  const [inline, inherited]

Definition at line 64 of file bounding_box.hpp.

00064 { return m_ymin ; }

double ymin ( void   )  [inline, inherited]

Definition at line 57 of file bounding_box.hpp.

Referenced by bcell2d_algebraic_curve< C, V >::bcell2d_algebraic_curve(), bcell3d_algebraic_curve< C, V >::bcell3d_algebraic_curve(), bcell3d_algebraic_surface< C, V >::bcell3d_algebraic_surface(), cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_surface< C, V >::cell3d_algebraic_surface(), cell3d< C, V >::center(), cell2d< C, REF_OF(V) >::center(), bcell3d_algebraic_surface< C, V >::center(), bcell3d< C, V >::center(), bcell2d_voronoi_impl_diagram< C, V >::compute_boundary(), bcell2d_voronoi_diagram< C, V >::compute_boundary(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), cell2d_algebraic_curve< C, V >::gradient(), bcell2d_voronoi_site2d< C, V >::gradient(), bcell2d_voronoi_impl2d< C, V >::gradient(), bcell2d_algebraic_curve< C, V >::gradient(), topology< C, V >::insert(), mesher3d_algebraic_curve< C, V >::insert(), bcell2d_voronoi_impl_diagram< C, V >::insert_regular(), bcell2d_voronoi_diagram< C, V >::insert_regular(), bounding_box< C, V >::intersect(), bounding_box< C, V >::intersected(), solver_implicit< C, V >::intersection(), bounding_box< C, V >::intersects(), cell3d< C, V >::is_adjacent(), cell2d< C, V >::is_adjacent(), bounding_box< C, V >::operator()(), cell3d_algebraic_surface< C, V >::point(), solver_implicit< C, V >::singular(), cell3d_algebraic_surface< C, V >::split(), bcell3d_algebraic_surface< C, V >::split(), cell3d< C, V >::split_position(), cell2d_algebraic_curve< C, V >::split_position(), bcell3d_list< C, V >::split_position(), bcell3d< C, V >::split_position(), bcell2d_voronoi_impl_diagram< C, V >::split_position(), bcell2d_voronoi_diagram< C, V >::split_position(), bcell2d_list< C, V >::split_position(), bcell2d_intersection< C, V >::split_position(), bcell2d< C, V >::split_position(), bcell3d_algebraic_curve< C, V >::subdivide(), bcell2d_voronoi_impl_diagram< C, V >::subdivide(), bcell2d_voronoi_diagram< C, V >::subdivide(), bcell2d_list< C, V >::subdivide(), bcell2d_intersection< C, V >::subdivide(), bcell3d_algebraic_surface< C, V >::topology_regular(), bounding_box< C, V >::unite(), bounding_box< C, V >::united(), bounding_box< C, V >::unites(), voronoi_site2d< C, V >::upper_bound(), cell3d_algebraic_surface< C, V >::value(), and EdgeListBuilder< node_t >::verifyFaceList().

00057 { return m_ymin ; }

double ysize ( void   )  const [inline, inherited]

Definition at line 70 of file bounding_box.hpp.

00070 { return m_ymax-m_ymin ; }

double zmax ( void   )  const [inline, inherited]

Definition at line 67 of file bounding_box.hpp.

00067 { return m_zmax ; }

double zmax ( void   )  [inline, inherited]
double zmin ( void   )  const [inline, inherited]

Definition at line 66 of file bounding_box.hpp.

00066 { return m_zmin ; }

double zmin ( void   )  [inline, inherited]
double zsize ( void   )  const [inline, inherited]

Definition at line 71 of file bounding_box.hpp.

00071 { return m_zmax-m_zmin ; }


Member Data Documentation

Seq<Point *> e_intersections [inherited]
Seq<bcell2d *> e_neighbors [inherited]

Definition at line 163 of file bcell2d.hpp.

gNode<bcell2d*>* m_gnode [inherited]

Definition at line 130 of file bcell2d.hpp.

Seq<Point *> m_singular [inherited]

Definition at line 216 of file bcell2d_algebraic_curve.hpp.

double m_xmax [protected, inherited]
double m_xmin [protected, inherited]

Definition at line 217 of file bcell2d_algebraic_curve.hpp.

double m_ymax [protected, inherited]
double m_ymin [protected, inherited]
double m_zmax [protected, inherited]
double m_zmin [protected, inherited]
Seq<Point *> n_intersections [inherited]
Seq<bcell2d *> n_neighbors [inherited]

Definition at line 164 of file bcell2d.hpp.

Seq<Point *> s_intersections [inherited]
Seq<bcell2d *> s_neighbors [inherited]

Definition at line 162 of file bcell2d.hpp.

Seq<Point *> w_intersections [inherited]
Seq<bcell2d *> w_neighbors [inherited]

Definition at line 165 of file bcell2d.hpp.


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

Generated on 6 Dec 2012 for shape by  doxygen 1.6.1