ambient vs max dim, (code first step)

This commit is contained in:
Olivier Devillers 2012-07-06 14:13:18 +00:00
parent 44c4d5cc8c
commit 284142f645
15 changed files with 85 additions and 84 deletions

View File

@ -28,6 +28,7 @@ check that the perturbation scheme is independant of the order of insertion
Add a template parameter Location_policy
ambient dim vs max dim
OD: global replace done, remains to get the dim from the traits (and not from the point of the traits)
check all is_valid function, precise in the doc what they are doing.
(do sth like 2/3 d)

View File

@ -50,7 +50,7 @@ int main(int argc, char **argv)
std::cout << " adding "<<N<<" other points "<< std::endl;
for(int i=0; i<N; ++i){
T::Vertex_handle v;
T::Face f(t.ambient_dimension());
T::Face f(t.maximal_dimension());
T::Facet ft;
T::Full_cell_handle c;
T::Locate_type lt;

View File

@ -10,7 +10,7 @@ int main()
typedef TDS::Vertex_handle Vertex_handle;
TDS D(ddim); // the argument is taken into account.
assert( ddim == D.ambient_dimension() );
assert( ddim == D.maximal_dimension() );
assert( -2 == D.current_dimension() );
assert( D.is_valid() );
std::vector<Vertex_handle> V(5);

View File

@ -7,7 +7,7 @@ int main()
typedef CGAL::Triangulation_data_structure<CGAL::Dimension_tag<7> > TDS;
TDS S;
assert( 7 == S.ambient_dimension() );
assert( 7 == S.maximal_dimension() );
assert( -2 == S.current_dimension() );
assert( S.is_valid() );

View File

@ -33,10 +33,10 @@ namespace CGAL {
template < class CHTraits, class TDS_ = Default >
class Convex_hull
{
typedef typename Ambient_dimension<typename CHTraits::Point_d>::type
Ambient_dimension_;
typedef typename Maximal_dimension<typename CHTraits::Point_d>::type
Maximal_dimension_;
typedef typename Default::Get<TDS_, Triangulation_data_structure
< Ambient_dimension_,
< Maximal_dimension_,
Triangulation_vertex<CHTraits>,
Triangulation_full_cell<CHTraits> >
>::type TDS;

View File

@ -36,9 +36,9 @@ class Delaunay_triangulation
>::type >
{
typedef typename Ambient_dimension<typename DCTraits::Point_d>::type
Ambient_dimension_;
Maximal_dimension_;
typedef typename Default::Get<_TDS, Triangulation_data_structure<
Ambient_dimension_,
Maximal_dimension_,
Triangulation_vertex<DCTraits>,
Triangulation_full_cell<DCTraits> >
>::type TDS;
@ -63,7 +63,7 @@ public: // PUBLIC NESTED TYPES
typedef typename Base::Facet Facet;
typedef typename Base::Face Face;
typedef typename Base::Ambient_dimension Ambient_dimension;
typedef typename Base::Maximal_dimension Maximal_dimension;
typedef typename DCTraits::Point_d Point;
typedef typename DCTraits::Point_d Point_d;
@ -88,7 +88,7 @@ protected: // DATA MEMBERS
public:
using Base::ambient_dimension;
using Base::maximal_dimension;
using Base::are_incident_full_cells_valid;
using Base::coaffine_orientation_predicate;
using Base::current_dimension;
@ -166,7 +166,7 @@ public:
Full_cell_handle remove(const Point & p, Full_cell_handle hint = Full_cell_handle())
{
Locate_type lt;
Face f(ambient_dimension());
Face f(maximal_dimension());
Facet ft;
Full_cell_handle s = locate(p, lt, f, ft, hint);
if( Base::ON_VERTEX == lt )
@ -205,7 +205,7 @@ public:
Vertex_handle insert(const Point & p, const Full_cell_handle start = Full_cell_handle())
{
Locate_type lt;
Face f(ambient_dimension());
Face f(maximal_dimension());
Facet ft;
Full_cell_handle s = locate(p, lt, f, ft, start);
return insert(p, lt, f, ft, s);
@ -408,13 +408,13 @@ Delaunay_triangulation<DCTraits, TDS>
typedef Triangulation_vertex<Geom_traits, Vertex_handle> Dark_vertex_base;
typedef Triangulation_full_cell<Geom_traits,
internal::Triangulation::Dark_full_cell_data<Self> > Dark_full_cell_base;
typedef Triangulation_data_structure<Ambient_dimension, Dark_vertex_base, Dark_full_cell_base> Dark_tds;
typedef Triangulation_data_structure<Maximal_dimension, Dark_vertex_base, Dark_full_cell_base> Dark_tds;
typedef Delaunay_triangulation<DCTraits, Dark_tds> Dark_triangulation;
typedef typename Dark_triangulation::Face Dark_face;
typedef typename Dark_triangulation::Facet Dark_facet;
typedef typename Dark_triangulation::Vertex_handle Dark_v_handle;
typedef typename Dark_triangulation::Full_cell_handle Dark_s_handle;
Dark_triangulation dark_side(ambient_dimension());
Dark_triangulation dark_side(maximal_dimension());
Dark_s_handle dark_s;
Dark_v_handle dark_v;
typedef std::map<Vertex_handle, Dark_v_handle> Vertex_map;
@ -499,7 +499,7 @@ Delaunay_triangulation<DCTraits, TDS>
// Now, compute the conflict zone of v->point() in
// the dark side. This is precisely the set of full_cells
// that we have to glue back into the light side.
Dark_face dark_f(dark_side.ambient_dimension());
Dark_face dark_f(dark_side.maximal_dimension());
Dark_facet dark_ft;
typename Dark_triangulation::Locate_type lt;
dark_s = dark_side.locate(v->point(), lt, dark_f, dark_ft);
@ -701,7 +701,7 @@ Delaunay_triangulation<DCTraits, TDS>
{
// we don't use Base::insert_outside_affine_hull(...) because here, we
// also need to reset the side_of_oriented_subsphere functor.
CGAL_precondition( current_dimension() < ambient_dimension() );
CGAL_precondition( current_dimension() < maximal_dimension() );
Vertex_handle v = tds().insert_increase_dimension(infinite_vertex());
// reset the predicates:
coaffine_orientation_predicate() = geom_traits().coaffine_orientation_d_object();
@ -798,7 +798,7 @@ Delaunay_triangulation<DCTraits, TDS>
::is_in_conflict(const Point & p, Full_cell_const_handle s) const
{
CGAL_precondition( 2 <= current_dimension() );
if( current_dimension() < ambient_dimension() )
if( current_dimension() < maximal_dimension() )
{
Conflict_pred_in_subspace c(*this, p, coaffine_orientation_predicate(), side_of_oriented_subsphere_predicate());
return c(s);
@ -819,7 +819,7 @@ Delaunay_triangulation<DCTraits, TDS>
::compute_conflict_zone(const Point & p, const Full_cell_handle s, OutputIterator out) const
{
CGAL_precondition( 2 <= current_dimension() );
if( current_dimension() < ambient_dimension() )
if( current_dimension() < maximal_dimension() )
{
Conflict_pred_in_subspace c(*this, p, coaffine_orientation_predicate(), side_of_oriented_subsphere_predicate());
Conflict_traversal_pred_in_subspace tp(*this, c);

View File

@ -28,15 +28,15 @@ template< typename RTTraits, typename TDS_ = Default >
class Regular_triangulation
: public Triangulation<RTTraits,
typename Default::Get<TDS_, Triangulation_data_structure<
typename Ambient_dimension<typename RTTraits::Point_d>::type,
typename Maximal_dimension<typename RTTraits::Point_d>::type,
Triangulation_vertex<RTTraits>,
Triangulation_full_cell<RTTraits> >
>::type >
{
typedef typename Ambient_dimension<typename RTTraits::Point_d>::type
Ambient_dimension_;
typedef typename Maximal_dimension<typename RTTraits::Point_d>::type
Maximal_dimension_;
typedef typename Default::Get<TDS_, Triangulation_data_structure<
Ambient_dimension_,
Maximal_dimension_,
Triangulation_vertex<RTTraits>,
Triangulation_full_cell<RTTraits> >
>::type TDS;
@ -44,7 +44,7 @@ class Regular_triangulation
typedef Regular_triangulation<RTTraits, TDS_> Self;
public:
typedef Ambient_dimension_ Ambient_dimension;
typedef Maximal_dimension_ Maximal_dimension;
};
} //namespace CGAL

View File

@ -26,11 +26,11 @@ namespace CGAL {
struct TDS_full_cell_mirror_storage_policy {}; // Stores the mirror index of all vertices.
template< typename Vertex_handle, typename Full_cell_handle, typename Ambient_dimension >
struct TFC_data< Vertex_handle, Full_cell_handle, Ambient_dimension, TDS_full_cell_mirror_storage_policy >
: public TFC_data< Vertex_handle, Full_cell_handle, Ambient_dimension, TDS_full_cell_default_storage_policy >
template< typename Vertex_handle, typename Full_cell_handle, typename Maximal_dimension >
struct TFC_data< Vertex_handle, Full_cell_handle, Maximal_dimension, TDS_full_cell_mirror_storage_policy >
: public TFC_data< Vertex_handle, Full_cell_handle, Maximal_dimension, TDS_full_cell_default_storage_policy >
{
typedef TFC_data< Vertex_handle, Full_cell_handle, Ambient_dimension, TDS_full_cell_default_storage_policy > Base;
typedef TFC_data< Vertex_handle, Full_cell_handle, Maximal_dimension, TDS_full_cell_default_storage_policy > Base;
typedef typename Base::Vertex_handle_array Vertex_handle_array;
typedef typename Base::Full_cell_handle_array Full_cell_handle_array;
typedef typename internal::S_or_D_array< int, typename Base::Dimen_plus > Int_array;

View File

@ -37,9 +37,9 @@ template < class TriangulationTraits, class TDS_ = Default >
class Triangulation
{
typedef typename Ambient_dimension<typename TriangulationTraits::Point_d>::type
Ambient_dimension_;
Maximal_dimension_;
typedef typename Default::Get<TDS_, Triangulation_data_structure
< Ambient_dimension_,
< Maximal_dimension_,
Triangulation_vertex<TriangulationTraits>,
Triangulation_full_cell<TriangulationTraits> >
>::type TDS;
@ -60,7 +60,7 @@ public:
typedef typename TDS::Facet Facet;
typedef typename TDS::Face Face;
typedef Ambient_dimension_ Ambient_dimension;
typedef Maximal_dimension_ Maximal_dimension;
typedef typename Geom_traits::Point_d Point;
typedef typename TDS::Vertex_handle Vertex_handle;
@ -171,8 +171,8 @@ public:
++infinity_;
++inf2;
}
// A full_cell has at most 1 + ambient_dimension() facets:
orientations_.resize(1 + ambient_dimension());
// A full_cell has at most 1 + maximal_dimension() facets:
orientations_.resize(1 + maximal_dimension());
// Our coaffine orientation predicates HAS state member variables
coaffine_orientation_predicate() = geom_traits().coaffine_orientation_d_object();
}
@ -229,7 +229,7 @@ public:
return kernel_;
}
int ambient_dimension() const { return tds().ambient_dimension(); }
int maximal_dimension() const { return tds().maximal_dimension(); }
int current_dimension() const { return tds().current_dimension(); }
bool empty() const
@ -338,7 +338,7 @@ public:
bool is_vertex(const Point & p, Vertex_handle & v, Full_cell_handle hint = Full_cell_handle()) const
{
Locate_type lt;
Face f(ambient_dimension());
Face f(maximal_dimension());
Facet ft;
Full_cell_handle s = locate(p, lt, f, ft, hint);
if( ON_VERTEX == lt )
@ -450,7 +450,7 @@ public:
CGAL_assertion( ! is_infinite(s) );
if( 0 == current_dimension() )
return POSITIVE;
if( current_dimension() == ambient_dimension() )
if( current_dimension() == maximal_dimension() )
{
Orientation_d ori = geom_traits().orientation_d_object();
return ori(s->points_begin(), s->points_begin() + 1 + current_dimension());
@ -467,8 +467,8 @@ public:
{
tds_.clear();
infinity_ = tds().insert_increase_dimension();
// A full_cell has at most 1 + ambient_dimension() facets:
orientations_.resize(1 + ambient_dimension());
// A full_cell has at most 1 + maximal_dimension() facets:
orientations_.resize(1 + maximal_dimension());
// Our coaffine orientation predicates HAS state member variables
coaffine_orientation_predicate() = geom_traits().coaffine_orientation_d_object();
#ifdef CGAL_TRIANGULATION_STATISTICS
@ -673,7 +673,7 @@ Triangulation<TT, TDS>
::insert(const Point & p, Full_cell_handle start)
{
Locate_type lt;
Face f(ambient_dimension());
Face f(maximal_dimension());
Facet ft;
Full_cell_handle s = locate(p, lt, f, ft, start);
return insert(p, lt, f, ft, s);
@ -757,7 +757,7 @@ Triangulation<TT, TDS>
std::vector<Full_cell_handle> simps;
simps.reserve(64);
std::back_insert_iterator<std::vector<Full_cell_handle> > out(simps);
if( current_dimension() < ambient_dimension() )
if( current_dimension() < maximal_dimension() )
{
Outside_convex_hull_traversal_predicate<Coaffine_orientation_d>
ochtp(*this, p, coaffine_orientation_predicate());
@ -779,7 +779,7 @@ typename Triangulation<TT, TDS>::Vertex_handle
Triangulation<TT, TDS>
::insert_outside_affine_hull(const Point & p)
{
CGAL_precondition( current_dimension() < ambient_dimension() );
CGAL_precondition( current_dimension() < maximal_dimension() );
Vertex_handle v = tds().insert_increase_dimension(infinite_vertex());
// reset the orientation predicate:
coaffine_orientation_predicate() = geom_traits().coaffine_orientation_d_object();
@ -848,7 +848,7 @@ Triangulation<TT, TDS>
}
// Check if query |p| is outside the affine hull
if( cur_dim < ambient_dimension() )
if( cur_dim < maximal_dimension() )
{
if( ! geom_traits().contained_in_affine_hull_d_object()(
s->points_begin(),
@ -979,7 +979,7 @@ Triangulation<TT, TDS>
Full_cell_handle start// starting full_cell for the walk
) const
{
if( current_dimension() == ambient_dimension() )
if( current_dimension() == maximal_dimension() )
{
Orientation_d ori = geom_traits().orientation_d_object();
return do_locate(p, loc_type, face, facet, start, ori);
@ -1011,7 +1011,7 @@ Triangulation<TT, TDS>
::locate(const Point & p, Full_cell_handle s) const
{
Locate_type lt;
Face face(ambient_dimension());
Face face(maximal_dimension());
Facet facet;
return locate(p, lt, face, facet, s);
}
@ -1108,7 +1108,7 @@ template < class TT, class TDS >
std::istream &
operator>>(std::istream & is, Triangulation<TT, TDS> & tr)
// reads :
// - the dimensions (ambient and current)
// - the dimensions (maximal and current)
// - the number of finite vertices
// - the non combinatorial information on vertices (point, etc)
// - the number of full_cells
@ -1133,7 +1133,7 @@ operator>>(std::istream & is, Triangulation<TT, TDS> & tr)
read(is, n, io_Read_write());
}
CGAL_assertion_msg( cd <= tr.ambient_dimension(), "input Triangulation has too high dimension");
CGAL_assertion_msg( cd <= tr.maximal_dimension(), "input Triangulation has too high dimension");
tr.clear();
tr.set_current_dimension(cd);
@ -1163,7 +1163,7 @@ template < class TT, class TDS >
std::ostream &
operator<<(std::ostream & os, const Triangulation<TT, TDS> & tr)
// writes :
// - the dimensions (ambient and current)
// - the dimensions (maximal and current)
// - the number of finite vertices
// - the non combinatorial information on vertices (point, etc)
// - the number of full_cells

View File

@ -87,7 +87,7 @@ protected:
typedef Compact_container<Full_cell> Full_cell_container;
public:
typedef Dimen Ambient_dimension;
typedef Dimen Maximal_dimension;
typedef typename Vertex_container::size_type size_type; /* Concept */
typedef typename Vertex_container::difference_type difference_type; /* Concept */
@ -135,23 +135,23 @@ private:
}
template < class Dim_tag >
struct get_ambient_dimension
struct get_maximal_dimension
{
static int value(const int D) { return D; }
};
// specialization
template < int D >
struct get_ambient_dimension<Dimension_tag<D> >
struct get_maximal_dimension<Dimension_tag<D> >
{
static int value(const int) { return D; }
};
public:
Triangulation_data_structure( int dim=0) /* Concept */
: dmax_(get_ambient_dimension<Dimen>::value(dim)), dcur_(-2),
: dmax_(get_maximal_dimension<Dimen>::value(dim)), dcur_(-2),
vertices_(), full_cells_()
{
CGAL_assertion_msg(dmax_ > 0, "ambient dimension must be positive.");
CGAL_assertion_msg(dmax_ > 0, "maximal dimension must be positive.");
}
~Triangulation_data_structure()
@ -203,7 +203,7 @@ protected:
public:
/* returns the current dimension of the full cells in the triangulation. */
int ambient_dimension() const { return dmax_; } /* Concept */
int maximal_dimension() const { return dmax_; } /* Concept */
int current_dimension() const { return dcur_; } /* Concept */
size_type number_of_vertices() const /* Concept */
@ -406,7 +406,7 @@ public:
void set_current_dimension(const int d) /* Concept */
{
CGAL_precondition(-1<=d && d<=ambient_dimension());
CGAL_precondition(-1<=d && d<=maximal_dimension());
dcur_ = d;
}
@ -881,7 +881,7 @@ Triangulation_data_structure<Dim, Vb, Fcb>
const int cur_dim = current_dimension();
Vertex_handle v = new_vertex();
// the full_cell 'fc' is just used to store the handle to all the new full_cells.
Full_cell fc(ambient_dimension());
Full_cell fc(maximal_dimension());
for( int i = 1; i <= cur_dim; ++i )
{
Full_cell_handle new_s = new_full_cell(s);
@ -1128,7 +1128,7 @@ Triangulation_data_structure<Dim, Vb, Fcb>
::insert_increase_dimension(Vertex_handle star = Vertex_handle()) /* Concept */
{
const int prev_cur_dim = current_dimension();
CGAL_precondition(prev_cur_dim < ambient_dimension());
CGAL_precondition(prev_cur_dim < maximal_dimension());
if( -2 != current_dimension() )
{
CGAL_precondition( Vertex_handle() != star );
@ -1460,7 +1460,7 @@ template<class Dimen, class Vb, class Fcb>
std::istream &
operator>>(std::istream & is, Triangulation_data_structure<Dimen, Vb, Fcb> & tr)
// reads :
// - the dimensions (ambient and current)
// - the dimensions (maximal and current)
// - the number of finite vertices
// - the non combinatorial information on vertices (point, etc)
// - the number of full_cells
@ -1485,7 +1485,7 @@ operator>>(std::istream & is, Triangulation_data_structure<Dimen, Vb, Fcb> & tr)
read(is, n, io_Read_write());
}
CGAL_assertion_msg( cd <= tr.ambient_dimension(), "input Triangulation_data_structure has too high dimension");
CGAL_assertion_msg( cd <= tr.maximal_dimension(), "input Triangulation_data_structure has too high dimension");
tr.clear();
tr.set_current_dimension(cd);
@ -1513,7 +1513,7 @@ template<class Dimen, class Vb, class Fcb>
std::ostream &
operator<<(std::ostream & os, const Triangulation_data_structure<Dimen, Vb, Fcb> & tr)
// writes :
// - the dimensions (ambient and current)
// - the dimensions (maximal and current)
// - the number of finite vertices
// - the non combinatorial information on vertices (point, etc)
// - the number of full cells

View File

@ -34,7 +34,7 @@ class Triangulation_ds_full_cell
typedef typename Default::Get<FullCellStoragePolicy, TDS_full_cell_default_storage_policy>::type
Storage_policy;
typedef Triangulation_ds_full_cell<TDS> Self;
typedef typename TDS::Ambient_dimension Ambient_dimension;
typedef typename TDS::Maximal_dimension Maximal_dimension;
public:
typedef typename TDS::Face Face;
@ -51,9 +51,9 @@ public:
private: // STORAGE
typedef TFC_data< Vertex_handle, Full_cell_handle,
Ambient_dimension, Storage_policy > Combinatorics;
Maximal_dimension, Storage_policy > Combinatorics;
friend class TFC_data< Vertex_handle, Full_cell_handle,
Ambient_dimension, Storage_policy >;
Maximal_dimension, Storage_policy >;
// array of vertices
typedef typename Combinatorics::Vertex_handle_array Vertex_handle_array;
// neighbor simplices
@ -87,7 +87,7 @@ public:
~Triangulation_ds_full_cell() {}
int ambient_dimension() const /* Concept */
int maximal_dimension() const /* Concept */
{
return vertices().size() - 1;
}
@ -104,26 +104,26 @@ public:
Vertex_handle vertex(const int i) const /* Concept */
{
CGAL_precondition(0<=i && i<=ambient_dimension());
CGAL_precondition(0<=i && i<=maximal_dimension());
return vertices()[i];
}
Full_cell_handle neighbor(const int i) const /* Concept */
{
CGAL_precondition(0<=i && i<=ambient_dimension());
CGAL_precondition(0<=i && i<=maximal_dimension());
return neighbors()[i];
}
int mirror_index(const int i) const /* Concept */
{
CGAL_precondition(0<=i && i<=ambient_dimension());
CGAL_precondition(0<=i && i<=maximal_dimension());
return combinatorics_.mirror_index(i);
}
// Advanced...
Vertex_handle mirror_vertex(const int i, const int cur_dim) const /* Concept */
{
CGAL_precondition(0<=i && i<=ambient_dimension());
CGAL_precondition(0<=i && i<=maximal_dimension());
return combinatorics_.mirror_vertex(i, cur_dim);
}
@ -149,19 +149,19 @@ public:
void set_vertex(const int i, Vertex_handle v) /* Concept */
{
CGAL_precondition(0<=i && i<=ambient_dimension());
CGAL_precondition(0<=i && i<=maximal_dimension());
vertices()[i] = v;
}
void set_neighbor(const int i, Full_cell_handle s) /* Concept */
{
CGAL_precondition(0<=i && i<=ambient_dimension());
CGAL_precondition(0<=i && i<=maximal_dimension());
neighbors()[i] = s;
}
void set_mirror_index(const int i, const int index) /* Concept */
{
CGAL_precondition(0<=i && i<=ambient_dimension());
CGAL_precondition(0<=i && i<=maximal_dimension());
combinatorics_.set_mirror_index(i, index);
}
@ -173,7 +173,7 @@ public:
bool has_vertex(Vertex_const_handle v, int & index) const /* Concept */
{
const int d = ambient_dimension();
const int d = maximal_dimension();
index = 0;
while( (index <= d) && (vertex(index) != v) )
++index;
@ -188,7 +188,7 @@ public:
bool has_neighbor(Full_cell_const_handle s, int & index) const /* Concept */
{
const int d = ambient_dimension();
const int d = maximal_dimension();
index = 0;
while( (index <= d) && (neighbor(index) != s) )
++index;
@ -197,8 +197,8 @@ public:
void swap_vertices(const int d1, const int d2) /* Concept */
{
CGAL_precondition(0 <= d1 && d1<=ambient_dimension());
CGAL_precondition(0 <= d2 && d2<=ambient_dimension());
CGAL_precondition(0 <= d1 && d1<=maximal_dimension());
CGAL_precondition(0 <= d2 && d2<=maximal_dimension());
combinatorics_.swap_vertices(d1, d2);
}
@ -210,7 +210,7 @@ public:
bool is_valid(bool verbose = true, int /* level */ = 0) const /* Concept */
{
const int d = ambient_dimension();
const int d = maximal_dimension();
for( int i = 0; i <= d; ++i )
{
if( Vertex_handle() != vertex(i) )

View File

@ -26,7 +26,7 @@ namespace CGAL {
template< typename TDS >
class Triangulation_face
{
typedef typename internal::Dimen_plus_one<typename TDS::Ambient_dimension>::type Dimen_plus;
typedef typename internal::Dimen_plus_one<typename TDS::Maximal_dimension>::type Dimen_plus;
public:
typedef typename TDS::Full_cell_handle Full_cell_handle; /* Concept */
typedef typename TDS::Vertex_handle Vertex_handle; /* Concept */
@ -38,14 +38,14 @@ protected:
public:
explicit Triangulation_face(Full_cell_handle s) /* Concept */
: full_cell_(s), indices_(s->ambient_dimension()+2)
: full_cell_(s), indices_(s->maximal_dimension()+2)
{
CGAL_assertion( Full_cell_handle() != s );
clear();
}
explicit Triangulation_face(const int ambient_dim) /* Concept */
: full_cell_(), indices_(ambient_dim+2)
explicit Triangulation_face(const int maximal_dim) /* Concept */
: full_cell_(), indices_(maximal_dim+2)
{
clear();
}

View File

@ -76,7 +76,7 @@ void test(const int d, const string & type, const int N)
cerr << nbfv <<endl;
// Count convex hull vertices:
if( pc.ambient_dimension() > 1 )
if( pc.maximal_dimension() > 1 )
{
typedef vector<Face> Faces;
Faces edges;
@ -85,7 +85,7 @@ void test(const int d, const string & type, const int N)
cout << "\nThere are " << edges.size() << " vertices on the convex hull.";
edges.clear();
}
else // pc.ambient_dimension() == 1
else // pc.maximal_dimension() == 1
{
typedef vector<Full_cell_handle> Cells;
Cells cells;

View File

@ -23,7 +23,7 @@ void test(const int d, const string & type)
TDS tds(d);
cout << "\nChecking Tds of (" << type << ") dimension "
<< tds.ambient_dimension();
<< tds.maximal_dimension();
assert(tds.empty());
vector<Vertex_handle> vhs;
vhs.push_back(tds.insert_increase_dimension());
@ -112,7 +112,7 @@ void test(const int d, const string & type)
TDS tds2(tds);
assert( tds2.is_valid() );
assert( tds.current_dimension() == tds2.current_dimension() );
assert( tds.ambient_dimension() == tds2.ambient_dimension() );
assert( tds.maximal_dimension() == tds2.maximal_dimension() );
assert( tds.number_of_vertices() == tds2.number_of_vertices() );
assert( tds.number_of_full_cells() == tds2.number_of_full_cells() );

View File

@ -30,7 +30,7 @@ void test(const int d, const string & type, int N)
T tri(d);
cerr << "\nChecking Triangulation of (" << type << d << ") dimension "
<< tri.ambient_dimension();
<< tri.maximal_dimension();
assert(tri.empty());
vector<RT> coords(d);
@ -72,7 +72,7 @@ void test(const int d, const string & type, int N)
T tri2(tri);
assert( tri2.is_valid() );
assert( tri.current_dimension() == tri2.current_dimension() );
assert( tri.ambient_dimension() == tri2.ambient_dimension() );
assert( tri.maximal_dimension() == tri2.maximal_dimension() );
assert( tri.number_of_vertices() == tri2.number_of_vertices() );
assert( tri.number_of_full_cells() == tri2.number_of_full_cells() );