replace Object

This commit is contained in:
Efi Fogel 2012-02-06 10:15:38 +00:00
parent 0d9f5aa107
commit 40fac7ad31
8 changed files with 146 additions and 194 deletions

View File

@ -41,30 +41,22 @@ namespace CGAL {
* function called "void _create_point_list(Point_list &)" which * function called "void _create_point_list(Point_list &)" which
* actually creates the list of landmarks. * actually creates the list of landmarks.
*/ */
template <class Arrangement_, template <typename Arrangement_,
class Nearest_neighbor_ = typename Nearest_neighbor_ =
Arr_landmarks_nearest_neighbor <typename Arr_landmarks_nearest_neighbor <Arrangement_> >
Arrangement_::Geometry_traits_2> > class Arr_landmarks_generator_base : public Arr_observer <Arrangement_> {
class Arr_landmarks_generator_base
: public Arr_observer <Arrangement_>
{
public: public:
typedef Arrangement_ Arrangement_2; typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef Nearest_neighbor_ Nearest_neighbor; typedef Nearest_neighbor_ Nearest_neighbor;
typedef Arr_landmarks_generator_base<Arrangement_2, typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
Nearest_neighbor> Self;
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
typedef typename Arrangement_2::Face_const_handle Face_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle;
typedef typename Arrangement_2::Vertex_handle Vertex_handle; typedef typename Arrangement_2::Vertex_handle Vertex_handle;
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle; typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
typedef typename Arrangement_2::Face_handle Face_handle; typedef typename Arrangement_2::Face_handle Face_handle;
typedef typename Arrangement_2::Vertex_const_iterator typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator;
Vertex_const_iterator;
typedef typename Arrangement_2::Ccb_halfedge_circulator typedef typename Arrangement_2::Ccb_halfedge_circulator
Ccb_halfedge_circulator; Ccb_halfedge_circulator;
@ -75,16 +67,19 @@ public:
typedef std::list<NN_Point_2> NN_Points_set; typedef std::list<NN_Point_2> NN_Points_set;
typedef std::vector<Point_2> Points_set; typedef std::vector<Point_2> Points_set;
typedef std::pair<Point_2,CGAL::Object> PL_pair; typedef std::pair<Point_2, CGAL::Object> PL_pair;
typedef std::vector<PL_pair> Pairs_set; typedef std::vector<PL_pair> Pairs_set;
typedef typename std::vector<PL_pair>::iterator Pairs_iterator; typedef typename std::vector<PL_pair>::iterator Pairs_iterator;
protected: private:
typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>
Self;
protected:
typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2; typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2;
// Data members: // Data members:
const Traits_adaptor_2 *m_traits; // The associated traits object. const Traits_adaptor_2* m_traits; // The associated traits object.
Nearest_neighbor nn; // The associated nearest neighbor object. Nearest_neighbor nn; // The associated nearest neighbor object.
bool ignore_notifications; bool ignore_notifications;
bool updated; bool updated;
@ -92,8 +87,8 @@ protected:
public: public:
bool is_empty() const { return nn.is_empty(); } bool is_empty() const { return nn.is_empty(); }
private:
private:
/*! Copy constructor - not supported. */ /*! Copy constructor - not supported. */
Arr_landmarks_generator_base (const Self& ); Arr_landmarks_generator_base (const Self& );

View File

@ -31,23 +31,16 @@ namespace CGAL {
* A generator for the landmarks point-locatoion class, which uses a * A generator for the landmarks point-locatoion class, which uses a
* set of points on a grid as its set of landmarks. * set of points on a grid as its set of landmarks.
*/ */
template <class Arrangement_, template <typename Arrangement_,
class Nearest_neighbor_ = typename Nearest_neighbor_ =
Arr_landmarks_nearest_neighbor<typename Arr_landmarks_nearest_neighbor<Arrangement_> >
Arrangement_::Geometry_traits_2> >
class Arr_grid_landmarks_generator : class Arr_grid_landmarks_generator :
public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_> public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_>
{ {
public: public:
typedef Arrangement_ Arrangement_2; typedef Arrangement_ Arrangement_2;
typedef Nearest_neighbor_ Nearest_neighbor; typedef Nearest_neighbor_ Nearest_neighbor;
typedef Arr_landmarks_generator_base<Arrangement_2,
Nearest_neighbor> Base;
typedef Arr_grid_landmarks_generator<Arrangement_2,
Nearest_neighbor> Self;
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2; typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator; typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator;
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
@ -59,12 +52,18 @@ public:
typedef typename Arrangement_2::Ccb_halfedge_circulator typedef typename Arrangement_2::Ccb_halfedge_circulator
Ccb_halfedge_circulator; Ccb_halfedge_circulator;
typedef typename Geometry_traits_2::Approximate_number_type ANT; typedef typename Geometry_traits_2::Approximate_number_type
ANT;
typedef typename Arrangement_2::Point_2 Point_2; typedef typename Arrangement_2::Point_2 Point_2;
protected: private:
typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>
Base;
typedef Arr_grid_landmarks_generator<Arrangement_2, Nearest_neighbor>
Self;
protected:
typedef typename Base::Points_set Points_set; typedef typename Base::Points_set Points_set;
typedef std::pair<Point_2,CGAL::Object> PL_pair; typedef std::pair<Point_2,CGAL::Object> PL_pair;
typedef std::vector<PL_pair> Pairs_set; typedef std::vector<PL_pair> Pairs_set;

View File

@ -31,45 +31,39 @@ namespace CGAL {
* A generator for the landmarks point-locatoion class, which uses a * A generator for the landmarks point-locatoion class, which uses a
* sequence of Halton points as its set of landmarks. * sequence of Halton points as its set of landmarks.
*/ */
template <class Arrangement_, template <typename Arrangement_,
class Nearest_neighbor_ = typename Nearest_neighbor_ =
Arr_landmarks_nearest_neighbor<typename Arr_landmarks_nearest_neighbor<Arrangement_> >
Arrangement_::Geometry_traits_2> >
class Arr_halton_landmarks_generator : class Arr_halton_landmarks_generator :
public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_> public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_>
{ {
public: public:
typedef Arrangement_ Arrangement_2; typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef Nearest_neighbor_ Nearest_neighbor; typedef Nearest_neighbor_ Nearest_neighbor;
typedef Arr_landmarks_generator_base<Arrangement_2, private:
Nearest_neighbor> Base; typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>
typedef Arr_halton_landmarks_generator<Arrangement_2, Base;
Nearest_neighbor> Self; typedef Arr_halton_landmarks_generator<Arrangement_2, Nearest_neighbor>
Self;
public:
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef typename Arrangement_2::Point_2 Point_2; typedef typename Arrangement_2::Point_2 Point_2;
typedef typename Base::Points_set Points_set; typedef typename Base::Points_set Points_set;
typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator;
typedef typename Arrangement_2::Vertex_const_iterator
Vertex_const_iterator;
protected: protected:
// Data members: // Data members:
unsigned int num_landmarks; unsigned int num_landmarks;
private: private:
/*! Copy constructor - not supported. */ /*! Copy constructor - not supported. */
Arr_halton_landmarks_generator (const Self& ); Arr_halton_landmarks_generator(const Self&);
/*! Assignment operator - not supported. */ /*! Assignment operator - not supported. */
Self& operator= (const Self& ); Self& operator=(const Self&);
public: public:
/*! Constructor. */ /*! Constructor. */
Arr_halton_landmarks_generator (const Arrangement_2& arr, Arr_halton_landmarks_generator (const Arrangement_2& arr,
unsigned int n_landmarks = 0) : unsigned int n_landmarks = 0) :

View File

@ -36,18 +36,23 @@ namespace CGAL {
* arrangement edges, which must be segments ! * arrangement edges, which must be segments !
* IMPORTANT: THIS ALGORITHM WORKS ONLY FOR SEGMENTS !!! * IMPORTANT: THIS ALGORITHM WORKS ONLY FOR SEGMENTS !!!
*/ */
template <class Arrangement_, template <typename Arrangement_,
class Nearest_neighbor_ typename Nearest_neighbor_ =
= Arr_landmarks_nearest_neighbor <typename Arrangement_::Traits_2> > Arr_landmarks_nearest_neighbor<Arrangement_> >
class Arr_middle_edges_landmarks_generator class Arr_middle_edges_landmarks_generator :
: public Arr_landmarks_generator_base <Arrangement_, Nearest_neighbor_> public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_>
{ {
public: public:
typedef Arrangement_ Arrangement_2; typedef Arrangement_ Arrangement_2;
typedef Arr_middle_edges_landmarks_generator<Arrangement_2, typedef Nearest_neighbor_ Nearest_neighbor;
Nearest_neighbor_> Self;
typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor_> Base;
private:
typedef Arr_middle_edges_landmarks_generator<Arrangement_2, Nearest_neighbor>
Self;
typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>
Base;
public:
typedef typename Arrangement_2::Traits_2 Traits_2; typedef typename Arrangement_2::Traits_2 Traits_2;
typedef typename Arrangement_2::Edge_const_iterator Edge_const_iterator; typedef typename Arrangement_2::Edge_const_iterator Edge_const_iterator;
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
@ -66,25 +71,23 @@ public:
typedef std::vector<Point_2> Points_set; typedef std::vector<Point_2> Points_set;
private: private:
/*! Copy constructor - not supported. */ /*! Copy constructor - not supported. */
Arr_middle_edges_landmarks_generator (const Self& ); Arr_middle_edges_landmarks_generator(const Self&);
/*! Assignment operator - not supported. */ /*! Assignment operator - not supported. */
Self& operator= (const Self& ); Self& operator=(const Self&);
public: public:
/*! Constructor. */ /*! Constructor. */
Arr_middle_edges_landmarks_generator Arr_middle_edges_landmarks_generator(const Arrangement_2& arr,
(const Arrangement_2& arr, int /* lm_num */ = -1) : int /* lm_num */ = -1) :
Base (arr) Base (arr)
{ {
//CGAL_PRINT_DEBUG("Arr_middle_edges_landmarks_generator constructor."); //CGAL_PRINT_DEBUG("Arr_middle_edges_landmarks_generator constructor.");
this->build_landmark_set(); this->build_landmark_set();
} }
//Observer functions that should be empty, because they // Observer functions that should be empty, because they
// got nothing to do with middle edges // got nothing to do with middle edges
//------------------------------------------------- //-------------------------------------------------
virtual void after_create_vertex (Vertex_handle /* v */){} virtual void after_create_vertex (Vertex_handle /* v */){}

View File

@ -34,39 +34,31 @@ namespace CGAL {
* It recieves a set of points, and builds a kd-tree for them. * It recieves a set of points, and builds a kd-tree for them.
* Given a query point, it finds the closest point to the query. * Given a query point, it finds the closest point to the query.
*/ */
template <class GeomTraits_> template <typename Arrangement_>
class Arr_landmarks_nearest_neighbor class Arr_landmarks_nearest_neighbor {
{
public: public:
typedef Arrangement_ Arrangement_2;
typedef GeomTraits_ Geometry_traits_2; typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef typename Geometry_traits_2::Approximate_number_type ANT; typedef typename Geometry_traits_2::Approximate_number_type ANT;
typedef typename Geometry_traits_2::Point_2 Point_2; typedef typename Geometry_traits_2::Point_2 Point_2;
typedef Arr_landmarks_nearest_neighbor<Geometry_traits_2> Self;
/*! \class NN_Point_2 /*! \class NN_Point_2
* Stores a point along with its approximate coordinates and its location * Stores a point along with its approximate coordinates and its location
* in the arrangement. * in the arrangement.
*/ */
class NN_Point_2 class NN_Point_2 {
{
public: public:
Point_2 m_point; // The point. Point_2 m_point; // The point.
Object m_object; // The arrangement feature containing the point. Object m_object; // The arrangement feature containing the point.
ANT m_vec[2]; // Approximate x and y-coordinates of the point. ANT m_vec[2]; // Approximate x and y-coordinates of the point.
public: public:
/*! Default constructor. */ /*! Default constructor. */
NN_Point_2() NN_Point_2() { m_vec[0] = m_vec[1] = 0; }
{
m_vec[0] = m_vec[1] = 0;
}
/*! Constructor from a point. */ /*! Constructor from a point. */
NN_Point_2 (const Point_2 &p) : NN_Point_2(const Point_2& p) :
m_point (p) m_point (p)
{ {
// Obtain the coordinate approximations, // Obtain the coordinate approximations,
@ -76,7 +68,7 @@ public:
} }
/*! Constructor from a point and an its location in the arrangement. */ /*! Constructor from a point and an its location in the arrangement. */
NN_Point_2 (const Point_2& p, const Object& obj) : NN_Point_2(const Point_2& p, const Object& obj) :
m_point (p), m_point (p),
m_object (obj) m_object (obj)
{ {
@ -87,10 +79,7 @@ public:
} }
/* Get the point. */ /* Get the point. */
const Point_2& point() const const Point_2& point() const { return (m_point); }
{
return (m_point);
}
/* Get the object representing the location in the arrangement. */ /* Get the object representing the location in the arrangement. */
const Object& object() const const Object& object() const
@ -99,30 +88,17 @@ public:
} }
/*! Get an iterator for the approximate coordinates. */ /*! Get an iterator for the approximate coordinates. */
const ANT* begin () const const ANT* begin () const { return (m_vec); }
{
return (m_vec);
}
/*! Get a past-the-end iterator for the approximate coordinates. */ /*! Get a past-the-end iterator for the approximate coordinates. */
const ANT* end () const const ANT* end () const { return (m_vec + 2); }
{
return (m_vec + 2);
}
/*! Equality operators. */ /*! Equality operators. */
bool operator== (const NN_Point_2& nnp) const bool operator== (const NN_Point_2& nnp) const
{ { return (m_vec[0] == nnp.m_vec[0] && m_vec[1] == nnp.m_vec[1]); }
return (m_vec[0] == nnp.m_vec[0] &&
m_vec[1] == nnp.m_vec[1]);
}
bool operator!= (const NN_Point_2& nnp) const bool operator!= (const NN_Point_2& nnp) const
{ { return (m_vec[0] != nnp.m_vec[0] || m_vec[1] != nnp.m_vec[1]); }
return (m_vec[0] != nnp.m_vec[0] ||
m_vec[1] != nnp.m_vec[1]);
}
}; };
/*! \struct Construct_coord_iterator /*! \struct Construct_coord_iterator
@ -134,20 +110,15 @@ public:
typedef const ANT* result_type; typedef const ANT* result_type;
/*! Get an iterator for the approximate coordinates. */ /*! Get an iterator for the approximate coordinates. */
const ANT* operator() (const NN_Point_2& nnp) const const ANT* operator()(const NN_Point_2& nnp) const
{ { return (nnp.begin()); }
return (nnp.begin());
}
/*! Get a past-the-end iterator for the approximate coordinates. */ /*! Get a past-the-end iterator for the approximate coordinates. */
const ANT* operator() (const NN_Point_2& nnp, int) const const ANT* operator()(const NN_Point_2& nnp, int) const
{ { return (nnp.end()); }
return (nnp.end());
}
}; };
protected: protected:
typedef CGAL::Search_traits<ANT, NN_Point_2, const ANT*, typedef CGAL::Search_traits<ANT, NN_Point_2, const ANT*,
Construct_coord_iterator> Search_traits; Construct_coord_iterator> Search_traits;
typedef CGAL::Orthogonal_k_neighbor_search<Search_traits> Neighbor_search; typedef CGAL::Orthogonal_k_neighbor_search<Search_traits> Neighbor_search;
@ -155,19 +126,20 @@ protected:
typedef typename Neighbor_search::Tree Tree; typedef typename Neighbor_search::Tree Tree;
// Data members: // Data members:
Tree *m_tree; // The search tree. Tree* m_tree; // The search tree.
bool m_is_empty; // Is the search tree empty. bool m_is_empty; // Is the search tree empty.
public: public:
bool is_empty() const{ return m_is_empty; } bool is_empty() const { return m_is_empty; }
private: private:
typedef Arr_landmarks_nearest_neighbor<Arrangement_2> Self;
/*! Copy constructor - not supported. */ /*! Copy constructor - not supported. */
Arr_landmarks_nearest_neighbor (const Self& ); Arr_landmarks_nearest_neighbor(const Self& );
/*! Assignment operator - not supported. */ /*! Assignment operator - not supported. */
Self& operator= (const Self& ); Self& operator=(const Self& );
public: public:

View File

@ -33,47 +33,42 @@ namespace CGAL {
* random set of points as its set of landmarks. * random set of points as its set of landmarks.
*/ */
template <class Arrangement_, template <typename Arrangement_,
class Nearest_neighbor_ = typename Nearest_neighbor_ =
Arr_landmarks_nearest_neighbor<typename Arr_landmarks_nearest_neighbor<Arrangement_> >
Arrangement_::Geometry_traits_2> >
class Arr_random_landmarks_generator : class Arr_random_landmarks_generator :
public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_> public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_>
{ {
public: public:
typedef Arrangement_ Arrangement_2; typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef Nearest_neighbor_ Nearest_neighbor; typedef Nearest_neighbor_ Nearest_neighbor;
typedef Arr_landmarks_generator_base<Arrangement_2, private:
Nearest_neighbor> Base; typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>
typedef Arr_random_landmarks_generator<Arrangement_2, Base;
Nearest_neighbor> Self; typedef Arr_random_landmarks_generator<Arrangement_2, Nearest_neighbor>
Self;
public:
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef typename Arrangement_2::Point_2 Point_2; typedef typename Arrangement_2::Point_2 Point_2;
typedef typename Base::Points_set Points_set; typedef typename Base::Points_set Points_set;
typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator;
typedef typename Arrangement_2::Vertex_const_iterator
Vertex_const_iterator;
protected: protected:
// Data members: // Data members:
unsigned int num_landmarks; unsigned int num_landmarks;
private: private:
/*! Copy constructor - not supported. */ /*! Copy constructor - not supported. */
Arr_random_landmarks_generator (const Self& ); Arr_random_landmarks_generator(const Self&);
/*! Assignment operator - not supported. */ /*! Assignment operator - not supported. */
Self& operator= (const Self& ); Self& operator=(const Self&);
public: public:
/*! Constructor. */ /*! Constructor. */
Arr_random_landmarks_generator (const Arrangement_2& arr, Arr_random_landmarks_generator(const Arrangement_2& arr,
unsigned int n_landmarks = 0) : unsigned int n_landmarks = 0) :
Base (arr), Base (arr),
num_landmarks (n_landmarks) num_landmarks (n_landmarks)

View File

@ -30,24 +30,24 @@ namespace CGAL {
* A generator for the landmarks point-locatoion class, which uses * A generator for the landmarks point-locatoion class, which uses
* specified set of points as its set of landmarks. * specified set of points as its set of landmarks.
*/ */
template <class Arrangement_, template <typename Arrangement_,
class Nearest_neighbor_ = typename Nearest_neighbor_ =
Arr_landmarks_nearest_neighbor<typename Arr_landmarks_nearest_neighbor<Arrangement_> >
Arrangement_::Geometry_traits_2> >
class Arr_landmarks_specified_points_generator : class Arr_landmarks_specified_points_generator :
public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_> public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_>
{ {
public: public:
typedef Arrangement_ Arrangement_2; typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef Nearest_neighbor_ Nearest_neighbor; typedef Nearest_neighbor_ Nearest_neighbor;
typedef Arr_landmarks_generator_base<Arrangement_2, private:
Nearest_neighbor> Base; typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>
typedef Arr_landmarks_vertices_generator<Arrangement_2, Base;
Nearest_neighbor> Self; typedef Arr_landmarks_vertices_generator<Arrangement_2, Nearest_neighbor>
Self;
public:
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
typedef typename Arrangement_2::Face_const_handle Face_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle;
@ -65,29 +65,26 @@ public:
typedef std::list<NN_Point_2> NN_Point_list; typedef std::list<NN_Point_2> NN_Point_list;
protected: protected:
typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2; typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2;
typedef std::pair<Point_2,CGAL::Object> PL_pair; typedef std::pair<Point_2,CGAL::Object> PL_pair;
typedef std::vector<PL_pair> Pairs_set; typedef std::vector<PL_pair> Pairs_set;
// Data members: // Data members:
const Traits_adaptor_2 *m_traits; // Its associated traits object. const Traits_adaptor_2* m_traits; // Its associated traits object.
Points_set m_points; // container of the specified points Points_set m_points; // container of the specified points
Pairs_set lm_pairs; Pairs_set lm_pairs;
int num_landmarks; int num_landmarks;
private: private:
/*! Copy constructor - not supported. */ /*! Copy constructor - not supported. */
Arr_landmarks_specified_points_generator (const Self& ); Arr_landmarks_specified_points_generator(const Self&);
/*! Assignment operator - not supported. */ /*! Assignment operator - not supported. */
Self& operator= (const Self& ); Self& operator=(const Self&);
public: public:
/*! Constructor. */ /*! Constructor. */
Arr_landmarks_specified_points_generator (const Arrangement_2& arr, Arr_landmarks_specified_points_generator(const Arrangement_2& arr,
const Points_set points) : const Points_set points) :
Base (arr), Base (arr),
num_landmarks(points.size()) num_landmarks(points.size())

View File

@ -31,24 +31,24 @@ namespace CGAL {
* A generator for the landmarks point-locatoion class, which uses the * A generator for the landmarks point-locatoion class, which uses the
* arrangement vertices as its set of landmarks. * arrangement vertices as its set of landmarks.
*/ */
template <class Arrangement_, template <typename Arrangement_,
class Nearest_neighbor_ = typename Nearest_neighbor_ =
Arr_landmarks_nearest_neighbor<typename Arr_landmarks_nearest_neighbor<Arrangement_> >
Arrangement_::Geometry_traits_2> >
class Arr_landmarks_vertices_generator : class Arr_landmarks_vertices_generator :
public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_> public Arr_landmarks_generator_base<Arrangement_, Nearest_neighbor_>
{ {
public: public:
typedef Arrangement_ Arrangement_2; typedef Arrangement_ Arrangement_2;
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef Nearest_neighbor_ Nearest_neighbor; typedef Nearest_neighbor_ Nearest_neighbor;
typedef Arr_landmarks_generator_base<Arrangement_2, private:
Nearest_neighbor> Base; typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>
typedef Arr_landmarks_vertices_generator<Arrangement_2, Base;
Nearest_neighbor> Self; typedef Arr_landmarks_vertices_generator<Arrangement_2, Nearest_neighbor>
Self;
public:
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle; typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle; typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
typedef typename Arrangement_2::Face_const_handle Face_const_handle; typedef typename Arrangement_2::Face_const_handle Face_const_handle;
@ -66,25 +66,22 @@ public:
typedef std::list<NN_Point_2> NN_Point_list; typedef std::list<NN_Point_2> NN_Point_list;
protected: protected:
typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2; typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2;
// Data members: // Data members:
const Traits_adaptor_2 *m_traits; // Its associated traits object. const Traits_adaptor_2* m_traits; // Its associated traits object.
int num_landmarks; int num_landmarks;
private: private:
/*! Copy constructor - not supported. */ /*! Copy constructor - not supported. */
Arr_landmarks_vertices_generator (const Self& ); Arr_landmarks_vertices_generator(const Self&);
/*! Assignment operator - not supported. */ /*! Assignment operator - not supported. */
Self& operator= (const Self& ); Self& operator=(const Self&);
public: public:
/*! Constructor. */ /*! Constructor. */
Arr_landmarks_vertices_generator (const Arrangement_2& arr) : Arr_landmarks_vertices_generator(const Arrangement_2& arr) :
Base (arr), Base (arr),
num_landmarks(0) num_landmarks(0)
{ {