|
shape_doc 0.1
|
#include <cell2d_semialgebraic_curve.hpp>
Definition at line 52 of file cell2d_semialgebraic_curve.hpp.
typedef algebraic_curve<C, REF_OF(V) > AlgebraicCurve [inherited] |
Definition at line 179 of file cell2d_algebraic_curve.hpp.
typedef algebraic_set<C, REF_OF(V) > AlgebraicSet [inherited] |
Definition at line 178 of file cell2d_algebraic_curve.hpp.
| typedef cell2d<C,V>::BoundingBox BoundingBox |
Reimplemented from cell2d_algebraic_curve< C, V >.
Definition at line 56 of file cell2d_semialgebraic_curve.hpp.
Reimplemented from cell2d< C, REF_OF(V) >.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 177 of file cell2d_algebraic_curve.hpp.
| typedef cell2d_semialgebraic_curve<C,V> Cell_t |
Definition at line 58 of file cell2d_semialgebraic_curve.hpp.
Reimplemented from cell2d< C, REF_OF(V) >.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 176 of file cell2d_algebraic_curve.hpp.
Reimplemented from cell2d_algebraic_curve< C, V >.
Definition at line 54 of file cell2d_semialgebraic_curve.hpp.
| typedef cell2d_algebraic_curve<C,V>::Polynomial Polynomial |
Reimplemented from cell2d_algebraic_curve< C, V >.
Definition at line 55 of file cell2d_semialgebraic_curve.hpp.
typedef solver_implicit<C,V> Solver [inherited] |
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 183 of file cell2d_algebraic_curve.hpp.
Reimplemented from cell2d< C, REF_OF(V) >.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 171 of file cell2d_algebraic_curve.hpp.
typedef topology2d<C,V> Topology2d [inherited] |
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 184 of file cell2d_algebraic_curve.hpp.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 175 of file cell2d_algebraic_curve.hpp.
| cell2d_semialgebraic_curve | ( | const Polynomial & | pol, |
| int | s, | ||
| const BoundingBox & | bx | ||
| ) |
Definition at line 84 of file cell2d_semialgebraic_curve.hpp.
References cell2d_algebraic_curve< C, V >::m_polynomial.
: Cell2dAlgebraicCurve(pol,bx) { if (s<0) this->m_polynomial*=-1; }
| cell2d_semialgebraic_curve | ( | semialgebraic_curve< C, V > * | cv, |
| const BoundingBox & | b | ||
| ) |
Definition at line 88 of file cell2d_semialgebraic_curve.hpp.
: Cell2dAlgebraicCurve(cv->inequality(),b) { }
| cell2d_semialgebraic_curve | ( | const cell2d_semialgebraic_curve< C, V > & | cl | ) | [inline] |
Definition at line 63 of file cell2d_semialgebraic_curve.hpp.
: Cell2dAlgebraicCurve(cl.m_polynomial, cl.boundingBox()) {}
| BoundingBox boundingBox | ( | ) | const [inline, inherited] |
Definition at line 88 of file cell.hpp.
{ return (BoundingBox)*this; }
| virtual Point center | ( | void | ) | const [inline, virtual, inherited] |
Definition at line 82 of file cell.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().
| bool contains | ( | double | x, |
| double | y, | ||
| double | z, | ||
| bool | strict = false |
||
| ) | [inherited] |
| bool contains | ( | double | x, |
| bool | strict = false |
||
| ) | [inherited] |
| bool contains | ( | double | x, |
| double | y, | ||
| bool | strict = false |
||
| ) | [inherited] |
| void disconnect | ( | ) | [inline, inherited] |
| Polynomial equation | ( | void | ) | [inline, inherited] |
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 193 of file cell2d_algebraic_curve.hpp.
References cell2d_algebraic_curve< C, V >::m_polynomial.
{ return m_polynomial; }
| cell2d_algebraic_curve< C, V >::Vector gradient | ( | const Point & | p | ) | [inherited] |
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 504 of file cell2d_algebraic_curve.hpp.
{
Polynomial
dx= diff(m_polynomial,0),
dy= diff(m_polynomial,1);
double
u0= (p[0]-this->xmin())/(this->xmax()-this->xmin()),
u1= (p[1]-this->ymin())/(this->ymax()-this->ymin());
Vector v;
v[0] = dx(u0,u1);
v[1] = dy(u0,u1);
return v;
}
| Polynomial inequality | ( | void | ) | const [inline] |
Definition at line 67 of file cell2d_semialgebraic_curve.hpp.
References cell2d_algebraic_curve< C, V >::m_polynomial.
{ return this->m_polynomial; }
| bool insert_regular | ( | Topology * | t | ) | [virtual, inherited] |
Implements cell< C, REF_OF(REF_OF(V)) >.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 375 of file cell2d_algebraic_curve.hpp.
References Edge, topology< C, V >::insert(), topology2d< C, V >::insert(), topology2d< C, V >::m_specials, point< C, V, N >::x(), and point< C, V, N >::y().
{
Topology2d* s= dynamic_cast<Topology2d*>(t);
Seq<Point*> l;
int ni, sgn(1);
Point *p,*q;
l= this->intersections();
ni=l.size();
std::cout<<"alg. curve, inserting regular "<< *this <<std::endl;
foreach( Point* e, l)
std::cout<<"("<< e->x()<<", "<<e->y()<<")"<<std::endl;
//assert(ni%2==0);
if(this->m_singular.size()==0)
{
foreach(Point* v, l)
s->insert(v);
while (l.size()>0)
{
//std::cout<<"L = "<< l <<std::endl;
p= l[0];
q= this->pair(p,sgn);
l.erase(0);
//std::cout<<"erased "<< p <<" "<<std::endl;int k=l.search(q);
l.erase( l.search(q) );
//std::cout<<"erased "<< q <<" ~"<<k<<std::endl;
s->insert(p,q);
//std::cout<<"edge "<<0<<" "<<q<<std::endl;
//std::cout<<"l.size()="<<l.size() <<std::endl;
}
}
else
{
//std::cout<<"Singular:"<<std::endl;
//std::cout<<this<<std::endl;
t->insert((BoundingBox*)this,false);
Point *c=this->m_singular[0];
s->m_specials<<c;
s->insert(c);
foreach(Point* p, this->n_intersections) s->insert(new Edge(p,c));
foreach(Point* p, this->e_intersections) s->insert(new Edge(p,c));
foreach(Point* p, this->s_intersections) s->insert(new Edge(p,c));
foreach(Point* p, this->w_intersections) s->insert(new Edge(p,c));
}
//std::cout<<"ok "<<std::endl;
return true;
}
| bool insert_singular | ( | Topology * | t | ) | [virtual, inherited] |
Implements cell< C, REF_OF(REF_OF(V)) >.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 431 of file cell2d_algebraic_curve.hpp.
References Edge, topology2d< C, V >::insert(), and topology2d< C, V >::m_specials.
{
// std::cout<<"Singular!!"<<std::endl;
//Mark singular box with a cross
//t->insert((BoundingBox*)this,true);return true;
Topology2d* s = dynamic_cast<Topology2d*>(t);
int sgn(1);
Seq<Point*> l;
foreach(Point* p, this->n_intersections) {
s->insert(p); l<<p;
}
foreach(Point* p, this->e_intersections) {
s->insert(p); l<<p;
}
foreach(Point* p, this->s_intersections) {
s->insert(p); l<<p;
}
foreach(Point* p, this->w_intersections) {
s->insert(p); l<<p;
}
int ni=l.size();
if(this->m_singular.size()==1) {
//std::cout<<"Singular:"<<std::endl;
//std::cout<<this<<std::endl;
//t->insert((BoundingBox*)this,false);
Point *c=this->m_singular[0];
s->m_specials<<c;
s->insert(c);
foreach(Point* p, this->n_intersections) s->insert(new Edge(p,c));
foreach(Point* p, this->e_intersections) s->insert(new Edge(p,c));
foreach(Point* p, this->s_intersections) s->insert(new Edge(p,c));
foreach(Point* p, this->w_intersections) s->insert(new Edge(p,c));
return true;
}
else // no singular points in the cell
{
if(ni==2) { // 2 points on the boundary
s->insert(l[0],l[1]);
return true;
}
else // more than one branch in the cell
{
Point *p,*q;
while (l.size()>0)
{
p= l[0];
q= this->pair(p,sgn);
l.erase(0);
l.erase( l.search(q) );
s->insert(p,q);
}
}
}
//std::cout<<"singular cell with "<<ni<<" bpts "<<this->m_singular.size()<<" epts"<<std::endl;
return true;
}
| bounding_box<C,REF_OF(REF_OF(V)) >* intersect | ( | const bounding_box< C, REF_OF(REF_OF(V)) > & | other | ) | [inherited] |
| void intersected | ( | bounding_box< C, REF_OF(REF_OF(V)) > * | other | ) | [inherited] |
| virtual Seq<Point *> intersections | ( | ) | const [inline, virtual, inherited] |
Definition at line 96 of file cell2d.hpp.
References cell2d< C, V >::e_intersections, cell2d< C, V >::n_intersections, cell2d< C, V >::s_intersections, and cell2d< C, V >::w_intersections.
{
Seq<Point *> r;
r<< this->s_intersections;
r<< this->e_intersections;
r<< this->n_intersections.reversed();
r<< this->w_intersections.reversed();
return ( r );
}
| virtual Seq<Point *> intersections | ( | int | i | ) | const [inline, virtual, inherited] |
Definition at line 105 of file cell2d.hpp.
References cell2d< C, V >::e_intersections, cell2d< C, V >::n_intersections, cell2d< C, V >::s_intersections, and cell2d< C, V >::w_intersections.
{
switch(i) {
case 0:
return s_intersections;
case 1:
return e_intersections;
case 2:
return n_intersections.reversed();
case 3:
return w_intersections.reversed();
default:
return (Seq<Point *>());
}
}
| bool intersects | ( | bounding_box< C, REF_OF(REF_OF(V)) > * | other, |
| bool | strict = true |
||
| ) | [inherited] |
| bool is0D | ( | void | ) | const [inline, inherited] |
Definition at line 80 of file bounding_box.hpp.
{ 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.
{ 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.
{ 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.
{ return ((m_xmin != m_xmax) && (m_ymin != m_ymax) && (m_zmin != m_zmax)) ; }
| bool is_active | ( | void | ) | [virtual] |
Reimplemented from cell2d_algebraic_curve< C, V >.
Definition at line 93 of file cell2d_semialgebraic_curve.hpp.
{
return ( Cell2dAlgebraicCurve::is_active() );
//
if( !Cell2dAlgebraicCurve::is_active() )//intersecting the bound curves
return false;
if( ! this->is_regular())
return true;
if( this->m_singular.size()!=0)
return true;
if (this->is_touching() )//is touching the set
return true;
else
return false;
}
| bool is_border | ( | void | ) | const [inline, inherited] |
Definition at line 121 of file cell2d.hpp.
References cell2d< C, V >::e_neighbors, cell2d< C, V >::n_neighbors, cell2d< C, V >::s_neighbors, and cell2d< C, V >::w_neighbors.
{
return ( this->s_neighbors.size()==0 ||
this->e_neighbors.size()==0 ||
this->n_neighbors.size()==0 ||
this->w_neighbors.size()==0 );
}
| bool is_corner | ( | void | ) | const [inherited] |
| bool is_intersected | ( | void | ) | [inline, virtual, inherited] |
Implements cell< C, REF_OF(REF_OF(V)) >.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 197 of file cell2d_algebraic_curve.hpp.
References cell2d< C, REF_OF(V) >::nb_intersect().
{return (this->nb_intersect()>0);};
| bool is_regular | ( | void | ) | [virtual, inherited] |
Implements cell< C, REF_OF(REF_OF(V)) >.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 319 of file cell2d_algebraic_curve.hpp.
{
// Assumption: cells with extremal points (dx=dy=0) that do not belong on the curve do not intersect the curve (assumes deep enough subdivision)
if(this->m_singular.size()>1) return false;
// if (0)
if (this->m_singular.size()==0) {
if(!has_sign_variation(m_polynomial)) return true;
Polynomial dx= diff(m_polynomial,0);
if(!has_sign_variation(dx)) return true;
Polynomial dy= diff(m_polynomial,1);
if(!has_sign_variation(dy)) return true;
int n= this->nb_intersect();
return ( n==2 );
//return ( n%2==0);
//return (n == 4 || n == 2 || n == 0 );
}
//return true;
//--------------------------------------------------------------------
if(this->m_singular.size()==1) {
// Polynomial
// dxf = diff(m_polynomial,0),
// dyf = diff(m_polynomial,1);
// std::cout<< "__________________"<<std::endl;
// std::cout<< m_polynomial;std::cout<< std::endl;
// std::cout<< "__________________"<<std::endl;
// std::cout<< dxf;std::cout<< std::endl;
// std::cout<< "__________________"<<std::endl;
// std::cout<< dyf;std::cout<< std::endl;
// std::cout<< "__________________"<<std::endl;
// int d;
// d = 1-2*topological_degree(dxf,dyf);
// d = 0;
return false; //(d==ni);
}
return true;
}
| bool is_touching | ( | void | ) |
Definition at line 116 of file cell2d_semialgebraic_curve.hpp.
{
const int * sz = this->m_polynomial.rep().szs();
const int * st = this->m_polynomial.rep().str();
if (!((this->m_polynomial[0] >0) ||
(this->m_polynomial[(sz[0]-1)*st[0]] >0)||
(this->m_polynomial[sz[0]*sz[1]-1]>0) ||
(this->m_polynomial[(sz[1]-1)*st[1]] >0)))
return false;
else
return true;
}
| void join0 | ( | cell2d< C, REF_OF(V) > * | b | ) | [inline, inherited] |
| void join1 | ( | cell2d< C, REF_OF(V) > * | b | ) | [inline, inherited] |
| virtual unsigned nb_intersect | ( | void | ) | const [inline, virtual, inherited] |
Definition at line 89 of file cell2d.hpp.
References cell2d< C, V >::e_intersections, cell2d< C, V >::n_intersections, cell2d< C, V >::s_intersections, and cell2d< C, V >::w_intersections.
Referenced by cell2d_voronoi_site2d< C, V >::is_intersected(), and cell2d_algebraic_curve< C, V >::is_intersected().
{
return (this->n_intersections.size()+
this->s_intersections.size()+
this->e_intersections.size()+
this->w_intersections.size() );
}
Definition at line 175 of file cell2d.hpp.
References cell2d< C, V >::e_intersections, cell2d< C, V >::e_neighbors, cell2d< C, V >::n_intersections, cell2d< C, V >::n_neighbors, cell2d< C, V >::s_intersections, cell2d< C, V >::s_neighbors, cell2d< C, V >::w_intersections, and cell2d< C, V >::w_neighbors.
{
foreach( cell2d *c, this->s_neighbors )
if ( c->n_intersections.member(p) )
{
return c;
}
foreach( cell2d *c, this->e_neighbors )
if ( c->w_intersections.member(p) )
{
return c;
}
foreach( cell2d *c, this->n_neighbors )
if ( c->s_intersections.member(p) )
{
return c;
}
foreach( cell2d *c, this->w_neighbors )
if ( c->e_intersections.member(p) )
{
return c;
}
// Point p on boundary.
//std::cout<<"... Point ("<<p->x()<<","<<p->y()<<") not found on neighbors of "<< this<<"("<<this->neighbors().size() <<")"<<std::endl;
return NULL;
}
| virtual Seq<cell2d *> neighbors | ( | ) | [inline, virtual, inherited] |
Definition at line 162 of file cell2d.hpp.
References cell2d< C, V >::e_neighbors, cell2d< C, V >::n_neighbors, cell2d< C, V >::s_neighbors, and cell2d< C, V >::w_neighbors.
{
Seq<cell2d *> r;
r<< this->s_neighbors;
r<< this->e_neighbors;
r<< this->n_neighbors;
r<< this->w_neighbors;
return ( r ); }
| double operator() | ( | unsigned | v, |
| unsigned | s | ||
| ) | const [inherited] |
| double& operator() | ( | unsigned | v, |
| unsigned | s | ||
| ) | [inherited] |
| bounding_box<C,REF_OF(REF_OF(V)) >* operator* | ( | const bounding_box< C, REF_OF(REF_OF(V)) > & | other | ) | [inline, inherited] |
Definition at line 103 of file bounding_box.hpp.
{ return intersect(other) ; }
| bounding_box<C,REF_OF(REF_OF(V)) >* operator+ | ( | const bounding_box< C, REF_OF(REF_OF(V)) > & | other | ) | [inline, inherited] |
Definition at line 104 of file bounding_box.hpp.
{ return unite(other) ; }
Reimplemented in cell2d_voronoi_site2d< C, V >.
| cell2d_voronoi_site2d< C, V >::Point * pair | ( | Point * | p, |
| int & | sgn | ||
| ) | [pure virtual, inherited] |
Definition at line 585 of file cell2d_algebraic_curve.hpp.
{
// Pair: returns a neighboring point on the component (p,sgn)
// The candidates are the 2 neighbor intersections of p in *this
Seq<Point*> all;
int a;
all= this->intersections();
a = all.size();
if (a==2)// regular cell with a single branch
{ return (all[0]==p ? all[1]: all[0]); }
if (a==1)
{ std::cout<<"Only 1 intersection point in "<< *this <<" (i.e."<<*all[0] <<")"<<std::endl;
// if ( abs( l[0]->x()-this->xmin()<EPSILON) &&
// abs( l[0]->y()-this->ymin()<EPSILON) )
return (p); }
int
s=this->s_intersections.size() ,// ~0
e=this->e_intersections.size() ,// ~1
//n=this->n_intersections.size() ,// ~2
w=this->w_intersections.size() ;// ~3
int j,k,i= all.search(p);
//if (this->is_regular() ) {
if (this->m_singular.size()==0 ) {
Vector grq, grp = this->gradient(*p);
foreach(Point* q, all)
if ( q != p)
{
grq = this->gradient(*q);
if(grp[0]*grq[0]>0 && grp[1]*grq[1]>0 )
return (q);
}
//box has 2 or more "identical" branches
//p is part of critical branch
std::cout<<"...maybe pair Trouble"<< this<<std::endl;
for (int v=0;v<a;v++)
for (int w=v+1;w<a;v++)
{
grp= this->gradient(*all[v]);
grq= this->gradient(*all[w]);
if( grp[0]*grq[0]>0 && grp[1]*grq[1]>0 )
{
for (int u=0; u<a;u++)
if ( u!=v && u!=w && all[u]!=p )
return (all[u]);
}
}
std::cout<<"empty BOX:("<<this->m_singular.size()<<",a="<<a<<")"<<this <<std::endl;
foreach(Point*v,all) {
Vector gr= this->gradient(*v);
//std::cout<<"("<<v->x()<<","<<v->y()<<"): ";
std::cout<<(gr[0]>0?1:-1)<<","<<(gr[1]>0?1:-1) <<std::endl;
}
//look non-tangent direction
foreach(Point* q, all)
if ( q != p)
{
grq = this->gradient(*q);
if( abs(grp[0]) < 0.017)
{ if (grp[1]*grq[1]>0)
return (q);
}
else if ( abs(grp[1])< 0.01)
{ if (grp[0]*grq[0]>0)
return (q);
}
}
std::cout<<"...pair Trouble"<< this<<std::endl;
// foreach(Point* q, all)
// if ( q != p)
// {
return (all[0]);
// }
}
else {//singular box
//std::cout<< "SBOX: " <<this <<std::endl;
//std::cout<< " " <<all <<std::endl;
//for (unsigned y=0;y<4;y++)
//std::cout<<y <<": ("<<all[y]->x()<<","<<all[y]->y()<<")"<<std::endl;
// Cell with 1 self-intersection
int ev(0);
int u, v;//side of p, ln resp.
j= ( i!=0 ? i-1 : a-1 );
k= ( i!=a-1 ? i+1 : 0 );
//std::cout<<"j,i,k (left,p,right)="<<j <<" "<<i << " "<<k<< std::endl;
Point *ln= all[j],
*rn= all[k] ;
//std::cout<<"i= "<< i<<", j=" <<j<< std::endl;
// std::cout<<"("<<a<<")"<<s<<", "<<e<<", "<<n<<", "<<w<< std::endl;
u= ( i<s ? 0 :
( i<s+e ? 1 :
( i<a-w ? 2 :
3 )));
v= ( j<s ? 0 :
( j<s+e ? 1 :
( j<a-w ? 2 :
3 )));
int * sz = this->m_polynomial.rep().szs();
int * st = this->m_polynomial.rep().str();
switch (u){
case 0:
ev= (this->m_polynomial[0] >0 ? 1:-1);
if (v==0 && j%2==0) // p, ln on the same face
ev*=-1;
break;
case 1:
ev= (this->m_polynomial[(sz[0]-1)*st[0]] >0 ? 1:-1);
if (v==1 && (j-s)%2==0) // p, ln on the same face
ev*=-1;
break;
case 2:
ev= (this->m_polynomial[sz[0]*sz[1]-1]>0 ? 1:-1);
if (v==2 && (j-s-e)%2==0) // p, ln on the same face
ev*=-1;
break;
case 3:
ev= (this->m_polynomial[(sz[1]-1)*st[1]] >0 ? 1:-1);
if (v==3 && (j-a+w)%2==0) // p, ln on the same face
ev*=-1;
break;
}
// std::cout<<"Cell"<<this <<"("<<(sgn==1 ? "+": "-")<<")" <<std::endl;
// std::cout<<"u= "<< u<<", v=" <<v<<", ev=" <<ev << std::endl;
// std::cout<<"ln= "<< ln->x()<<","<<ln->y() << std::endl;
// std::cout<<"p = "<< p->x()<<","<<p->y() << std::endl;
// std::cout<<"rn= "<< rn->x()<<","<<rn->y() << std::endl;
// if (ev*sgn>0) std::cout<<"result is ln"<< std::endl;
// else std::cout<<"result is rn"<< std::endl;
if (ev*sgn>0) return ln;
else return rn;
}
}
| void set_xmax | ( | double | x | ) | [inline, inherited] |
Definition at line 74 of file bounding_box.hpp.
{ this->m_xmax = x ; }
| void set_xmin | ( | double | x | ) | [inline, inherited] |
Definition at line 73 of file bounding_box.hpp.
{ this->m_xmin = x ; }
| void set_ymax | ( | double | y | ) | [inline, inherited] |
Definition at line 76 of file bounding_box.hpp.
{ this->m_ymax = y ; }
| void set_ymin | ( | double | y | ) | [inline, inherited] |
Definition at line 75 of file bounding_box.hpp.
{ this->m_ymin = y ; }
| void set_zmax | ( | double | z | ) | [inline, inherited] |
Definition at line 78 of file bounding_box.hpp.
{ this->m_zmax = z ; }
| void set_zmin | ( | double | z | ) | [inline, inherited] |
Definition at line 77 of file bounding_box.hpp.
{ this->m_zmin = z ; }
| int side | ( | Point * | p | ) | [inline, inherited] |
Definition at line 140 of file cell2d.hpp.
References cell2d< C, V >::e_intersections, cell2d< C, V >::intersections(), cell2d< C, V >::s_intersections, and cell2d< C, V >::w_intersections.
{
Seq<Point*> all;
int s,i,a;
s = s_intersections.size();
all = this->intersections();
a = all.size();
i = all.search(p);
if (i==-1) return (-1);
else return
( i<s ? 0 :
( i<s+(int)e_intersections.size() ? 1 :
( i<a-(int)w_intersections.size() ? 2 :
3 )));
}
| double size | ( | void | ) | [inherited] |
| virtual void split_position | ( | int & | v, |
| double & | t | ||
| ) | [virtual, inherited] |
Implements cell< C, REF_OF(REF_OF(V)) >.
| cell2d_algebraic_curve< C, V >::Point * starting_point | ( | int | sgn | ) | [virtual, inherited] |
Implements cell2d< C, REF_OF(V) >.
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 519 of file cell2d_algebraic_curve.hpp.
{
// std::cout<<"startingPoint.AlgCurve"<<std::endl;
Seq<Point*> l, all;
unsigned a;
all = this->intersections();
// std::cout<<this<<" , "<<a<<std::endl;
// foreach(Point*p,all)
// std::cout<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl;
// if (l.size()==4) // two duplicate corners
// {
// all<< l[1];
// all<< l[0];
// }
// else
// all=l;
a = all.size();
if (a==1) return all[0];
int ev(0);
int u ;//position of p
unsigned
s=this->s_intersections.size() ,// ~0
e=this->e_intersections.size() ,// ~1
//n=this->n_intersections.size() ,// ~2
w=this->w_intersections.size() ;// ~3
u= ( 0<s ? 0 :
( 0<s+e ? 1 :
( 0<a-w ? 2 :
3 )));
int * sz = this->m_polynomial.rep().szs();
int * st = this->m_polynomial.rep().str();
switch (u){
case 0:
ev= (this->m_polynomial[0] >0 ? 1:-1);
break;
case 1:
ev= (this->m_polynomial[(sz[0]-1)*st[0]] >0 ? 1:-1);
break;
case 2:
ev= (this->m_polynomial[sz[0]*sz[1]-1]>0 ? 1:-1);
break;
case 3:
ev= (this->m_polynomial[(sz[1]-1)*st[1]] >0 ? 1:-1);
break;
}
if (ev*sgn>0) {
return all[0];
}
else {
return all[1];
}
}
| virtual void subdivide | ( | cell< C, REF_OF(REF_OF(V)) > *& | left, |
| cell< C, REF_OF(REF_OF(V)) > *& | right, | ||
| int | v, | ||
| double | s | ||
| ) | [pure virtual, inherited] |
| virtual int subdivide | ( | cell< C, REF_OF(REF_OF(V)) > *& | left, |
| cell< C, REF_OF(REF_OF(V)) > *& | right | ||
| ) | [virtual, inherited] |
Reimplemented in cell2d_voronoi_site2d< C, V >.
Definition at line 499 of file cell2d_algebraic_curve.hpp.
References SELF, and cell2d_subdivisor< C, V >::subdivide().
{
cell2d_subdivisor<C,V>::subdivide( *this,(SELF*&)Left,(SELF*&)Right,v,s);
}
Definition at line 131 of file cell2d_semialgebraic_curve.hpp.
{
// std::cout<<"subdivide semialg"<< this<<", intsects: "<< this->nb_intersect() <<std::endl;
Cell2dAlgebraicCurve::subdivide(Left,Right,v,s) ;
// std::cout<<"subdivide end"<< this<<", intsects: "<< this->nb_intersect() <<std::endl;
}
| bounding_box<C,REF_OF(REF_OF(V)) >* unite | ( | bounding_box< C, REF_OF(REF_OF(V)) > * | other | ) | [inherited] |
| void united | ( | bounding_box< C, REF_OF(REF_OF(V)) > * | other | ) | [inherited] |
| bool unites | ( | bounding_box< C, REF_OF(REF_OF(V)) > * | other, |
| bool | strict = true |
||
| ) | [inherited] |
| double xmax | ( | void | ) | const [inline, inherited] |
Definition at line 63 of file bounding_box.hpp.
{ return m_xmax ; }
| double xmax | ( | void | ) | [inline, inherited] |
Definition at line 56 of file bounding_box.hpp.
{ return m_xmax ; }
| double xmin | ( | void | ) | [inline, inherited] |
Definition at line 55 of file bounding_box.hpp.
{ return m_xmin ; }
| double xmin | ( | void | ) | const [inline, inherited] |
Definition at line 62 of file bounding_box.hpp.
{ return m_xmin ; }
| double xsize | ( | void | ) | const [inline, inherited] |
Definition at line 69 of file bounding_box.hpp.
| double ymax | ( | void | ) | [inline, inherited] |
Definition at line 58 of file bounding_box.hpp.
{ return m_ymax ; }
| double ymax | ( | void | ) | const [inline, inherited] |
Definition at line 65 of file bounding_box.hpp.
{ return m_ymax ; }
| double ymin | ( | void | ) | [inline, inherited] |
Definition at line 57 of file bounding_box.hpp.
{ return m_ymin ; }
| double ymin | ( | void | ) | const [inline, inherited] |
Definition at line 64 of file bounding_box.hpp.
{ return m_ymin ; }
| double ysize | ( | void | ) | const [inline, inherited] |
Definition at line 70 of file bounding_box.hpp.
| double zmax | ( | void | ) | [inline, inherited] |
Definition at line 60 of file bounding_box.hpp.
{ return m_zmax ; }
| double zmax | ( | void | ) | const [inline, inherited] |
Definition at line 67 of file bounding_box.hpp.
{ return m_zmax ; }
| double zmin | ( | void | ) | [inline, inherited] |
Definition at line 59 of file bounding_box.hpp.
{ return m_zmin ; }
| double zmin | ( | void | ) | const [inline, inherited] |
Definition at line 66 of file bounding_box.hpp.
{ return m_zmin ; }
| double zsize | ( | void | ) | const [inline, inherited] |
Definition at line 71 of file bounding_box.hpp.
Seq<Point *> e_intersections [inherited] |
Definition at line 130 of file cell2d.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve().
Seq<cell2d *> e_neighbors [inherited] |
Definition at line 171 of file cell2d.hpp.
Definition at line 138 of file cell2d.hpp.
Polynomial m_polynomial [inherited] |
Definition at line 208 of file cell2d_algebraic_curve.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell2d_semialgebraic_curve< C, V >::cell2d_semialgebraic_curve(), cell2d_voronoi_site2d< C, V >::equation(), cell2d_algebraic_curve< C, V >::equation(), and cell2d_semialgebraic_curve< C, V >::inequality().
Seq<Point *> m_singular [inherited] |
Definition at line 133 of file cell2d.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve().
Seq<Point *> m_xcritical [inherited] |
Definition at line 209 of file cell2d_algebraic_curve.hpp.
double m_xmax [protected, inherited] |
Definition at line 107 of file bounding_box.hpp.
double m_xmin [protected, inherited] |
Definition at line 107 of file bounding_box.hpp.
Seq<Point *> m_ycritical [inherited] |
Definition at line 210 of file cell2d_algebraic_curve.hpp.
double m_ymax [protected, inherited] |
Definition at line 108 of file bounding_box.hpp.
double m_ymin [protected, inherited] |
Definition at line 108 of file bounding_box.hpp.
double m_zmax [protected, inherited] |
Definition at line 109 of file bounding_box.hpp.
double m_zmin [protected, inherited] |
Definition at line 109 of file bounding_box.hpp.
Seq<Point *> n_intersections [inherited] |
Definition at line 131 of file cell2d.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve().
Seq<cell2d *> n_neighbors [inherited] |
Definition at line 172 of file cell2d.hpp.
Seq<Point *> s_intersections [inherited] |
Definition at line 129 of file cell2d.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve().
Seq<cell2d *> s_neighbors [inherited] |
Definition at line 170 of file cell2d.hpp.
Seq<Point *> w_intersections [inherited] |
Definition at line 132 of file cell2d.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve().
Seq<cell2d *> w_neighbors [inherited] |
Definition at line 173 of file cell2d.hpp.