BWAPI
Classes | Public Types | Public Member Functions | Protected Types | Protected Attributes
Arr_landmarks_nearest_neighbor< GeomTraits_ > Class Template Reference

#include <Arr_lm_nearest_neighbor.h>

List of all members.

Classes

struct  Construct_coord_iterator
class  NN_Point_2

Public Types

typedef GeomTraits_ Geometry_traits_2
typedef
Geometry_traits_2::Approximate_number_type 
ANT
typedef Geometry_traits_2::Point_2 Point_2
typedef
Arr_landmarks_nearest_neighbor
< Geometry_traits_2
Self

Public Member Functions

 Arr_landmarks_nearest_neighbor ()
 ~Arr_landmarks_nearest_neighbor ()
template<class InputIterator >
void init (InputIterator begin, InputIterator end)
void clear ()
Point_2 find_nearest_neighbor (const Point_2 &q, Object &obj) const

Protected Types

typedef CGAL::Search_traits
< ANT, NN_Point_2, const ANT
*, Construct_coord_iterator
Search_traits
typedef
CGAL::Orthogonal_k_neighbor_search
< Search_traits
Neighbor_search
typedef Neighbor_search::iterator Neighbor_iterator
typedef Neighbor_search::Tree Tree

Protected Attributes

Treem_tree
bool m_is_empty

template<class GeomTraits_>
class Arr_landmarks_nearest_neighbor< GeomTraits_ >


Member Typedef Documentation

template<class GeomTraits_ >
typedef Geometry_traits_2::Approximate_number_type Arr_landmarks_nearest_neighbor< GeomTraits_ >::ANT
template<class GeomTraits_ >
typedef GeomTraits_ Arr_landmarks_nearest_neighbor< GeomTraits_ >::Geometry_traits_2
template<class GeomTraits_ >
typedef Neighbor_search::iterator Arr_landmarks_nearest_neighbor< GeomTraits_ >::Neighbor_iterator [protected]
template<class GeomTraits_ >
typedef CGAL::Orthogonal_k_neighbor_search<Search_traits> Arr_landmarks_nearest_neighbor< GeomTraits_ >::Neighbor_search [protected]
template<class GeomTraits_ >
typedef Geometry_traits_2::Point_2 Arr_landmarks_nearest_neighbor< GeomTraits_ >::Point_2
template<class GeomTraits_ >
typedef CGAL::Search_traits<ANT, NN_Point_2, const ANT*, Construct_coord_iterator> Arr_landmarks_nearest_neighbor< GeomTraits_ >::Search_traits [protected]
template<class GeomTraits_ >
typedef Arr_landmarks_nearest_neighbor<Geometry_traits_2> Arr_landmarks_nearest_neighbor< GeomTraits_ >::Self
template<class GeomTraits_ >
typedef Neighbor_search::Tree Arr_landmarks_nearest_neighbor< GeomTraits_ >::Tree [protected]

Constructor & Destructor Documentation

template<class GeomTraits_ >
Arr_landmarks_nearest_neighbor< GeomTraits_ >::Arr_landmarks_nearest_neighbor ( ) [inline]

Default constructor.

template<class GeomTraits_ >
Arr_landmarks_nearest_neighbor< GeomTraits_ >::~Arr_landmarks_nearest_neighbor ( ) [inline]

Destructor.

Here is the call graph for this function:


Member Function Documentation

template<class GeomTraits_ >
void Arr_landmarks_nearest_neighbor< GeomTraits_ >::clear ( ) [inline]

Clear the search tree.

Here is the caller graph for this function:

template<class GeomTraits_ >
Point_2 Arr_landmarks_nearest_neighbor< GeomTraits_ >::find_nearest_neighbor ( const Point_2 q,
Object obj 
) const [inline]

Find the nearest landmark point to the query point.

Parameters:
qThe query point.
objOutput: The location of the nearest landmark point in the arrangement (a vertex, halfedge, or face handle).
Precondition:
The search tree has been initialized and is not empty.
Returns:
The nearest landmark point.

Here is the call graph for this function:

template<class GeomTraits_ >
template<class InputIterator >
void Arr_landmarks_nearest_neighbor< GeomTraits_ >::init ( InputIterator  begin,
InputIterator  end 
) [inline]

Allocate the search tree and initialize it with landmark points.

Parameters:
beginAn iterator for the first landmark point.
endA past-the-end iterator for the landmark points.
Precondition:
The search tree is not initialized.

Member Data Documentation

template<class GeomTraits_ >
bool Arr_landmarks_nearest_neighbor< GeomTraits_ >::m_is_empty [protected]
template<class GeomTraits_ >
Tree* Arr_landmarks_nearest_neighbor< GeomTraits_ >::m_tree [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines