mirror of https://github.com/CGAL/cgal
replace Object
This commit is contained in:
parent
0d9f5aa107
commit
40fac7ad31
|
|
@ -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;
|
||||||
|
|
||||||
|
|
@ -79,8 +71,11 @@ public:
|
||||||
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:
|
||||||
|
|
@ -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& );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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) :
|
||||||
|
|
|
||||||
|
|
@ -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,18 +71,16 @@ 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.");
|
||||||
|
|
|
||||||
|
|
@ -34,36 +34,28 @@ 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) :
|
||||||
|
|
@ -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
|
||||||
|
|
@ -135,19 +111,14 @@ public:
|
||||||
|
|
||||||
/*! 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;
|
||||||
|
|
@ -162,6 +133,7 @@ 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& );
|
||||||
|
|
|
||||||
|
|
@ -33,45 +33,40 @@ 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) :
|
||||||
|
|
|
||||||
|
|
@ -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,7 +65,6 @@ 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;
|
||||||
|
|
@ -77,7 +76,6 @@ protected:
|
||||||
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&);
|
||||||
|
|
||||||
|
|
@ -85,7 +83,6 @@ private:
|
||||||
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) :
|
||||||
|
|
|
||||||
|
|
@ -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,7 +66,6 @@ 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:
|
||||||
|
|
@ -74,7 +73,6 @@ protected:
|
||||||
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&);
|
||||||
|
|
||||||
|
|
@ -82,7 +80,6 @@ private:
|
||||||
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),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue