\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.7 - dD Spatial Searching
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Manhattan_distance_iso_box_point< Traits > Class Template Reference

#include <CGAL/Manhattan_distance_iso_box_point.h>

Definition

The class Manhattan_distance_iso_box_point provides an implementation of the GeneralDistance concept for the Manhattan distance ( \( l_1\) metric) between a d-dimensional iso-box and a d-dimensional point and the Manhattan distance between a d-dimensional iso-box and a d-dimensional iso-box defined as a k-d tree rectangle.

Template Parameters
Traitsmust be a model for the concept SearchTraits, for example Search_traits_3<Simple_cartesian<double> >.
Is Model Of:
GeneralDistance
See also
GeneralDistance
Examples:
Spatial_searching/general_neighbor_searching.cpp.

Types

typedef unspecified_type D
 Dimension Tag. More...
 
typedef Traits::FT FT
 Number type. More...
 
typedef Traits::Point_d Point_d
 Point type. More...
 
typedef Traits::Iso_box_d Query_item
 Query item type. More...
 

Creation

 Manhattan_distance_iso_box_point (Traits t=Traits())
 Default constructor. More...
 

Operations

FT transformed_distance (Query_item b, Point_d p) const
 Returns the transformed distance between b and p. More...
 
FT transformed_distance (FT d) const
 Returns the transformed value of of d. More...
 
FT inverse_of_transformed_distance (FT d) const
 Returns the value of the inverse of the transform function applied to d. More...
 
FT min_distance_to_rectangle (Query_item b, Kd_tree_rectangle< FT, D > r) const
 Returns the minimal distance between a point from b and a point from r. More...
 
FT max_distance_to_rectangle (Query_item b, Kd_tree_rectangle< FT, D > r) const
 Returns the maximal distance between the iso-box b and a point from r furthest to b. More...
 

Member Typedef Documentation

template<typename Traits >
typedef unspecified_type CGAL::Manhattan_distance_iso_box_point< Traits >::D

Dimension Tag.

template<typename Traits >
typedef Traits::FT CGAL::Manhattan_distance_iso_box_point< Traits >::FT

Number type.

template<typename Traits >
typedef Traits::Point_d CGAL::Manhattan_distance_iso_box_point< Traits >::Point_d

Point type.

template<typename Traits >
typedef Traits::Iso_box_d CGAL::Manhattan_distance_iso_box_point< Traits >::Query_item

Query item type.

Constructor & Destructor Documentation

template<typename Traits >
CGAL::Manhattan_distance_iso_box_point< Traits >::Manhattan_distance_iso_box_point ( Traits  t = Traits())

Default constructor.

Member Function Documentation

template<typename Traits >
FT CGAL::Manhattan_distance_iso_box_point< Traits >::inverse_of_transformed_distance ( FT  d) const

Returns the value of the inverse of the transform function applied to d.

template<typename Traits >
FT CGAL::Manhattan_distance_iso_box_point< Traits >::max_distance_to_rectangle ( Query_item  b,
Kd_tree_rectangle< FT, D r 
) const

Returns the maximal distance between the iso-box b and a point from r furthest to b.

template<typename Traits >
FT CGAL::Manhattan_distance_iso_box_point< Traits >::min_distance_to_rectangle ( Query_item  b,
Kd_tree_rectangle< FT, D r 
) const

Returns the minimal distance between a point from b and a point from r.

template<typename Traits >
FT CGAL::Manhattan_distance_iso_box_point< Traits >::transformed_distance ( Query_item  b,
Point_d  p 
) const

Returns the transformed distance between b and p.

template<typename Traits >
FT CGAL::Manhattan_distance_iso_box_point< Traits >::transformed_distance ( FT  d) const

Returns the transformed value of of d.