CGAL 5.1 - dD Spatial Searching
CGAL::Euclidean_distance_sphere_point< Traits > Class Template Reference

#include <CGAL/Euclidean_distance_sphere_point.h>

Definition

template<typename Traits>
class CGAL::Euclidean_distance_sphere_point< Traits >

The class Euclidean_distance_sphere_point provides an implementation of the GeneralDistance concept for the Euclidean distance ( \( l_2\) metric) between a \( d\)-dimensional sphere and a point, and the Euclidean distance between a \( d\)-dimensional sphere and a \( d\)-dimensional iso-rectangle defined as a \(k\)- \(d\) tree rectangle.

Template Parameters
Traitsmust be a model of the concept SearchTraits, for example Simple_cartesian_d<double>.
Is Model Of:
GeneralDistance
See also
GeneralDistance

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::Sphere_d Sphere_d
 Query item type. More...
 

Creation

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

Operations

NT transformed_distance (Query_item s, Point_d p) const
 Returns the distance between s and p. More...
 
NT min_distance_to_rectangle (Query_item s, Kd_tree_rectangle< FT, D > r) const
 Returns the minimal distance between a point from the sphere s and a point from r. More...
 
NT max_distance_to_rectangle (Query_item s, Kd_tree_rectangle< FT, D > r) const
 Returns the maximal distance between the sphere s and a point from r furthest to s. More...
 
NT transformed_distance (NT d) const
 Returns \( d^2\). More...
 
NT inverse_of_transformed_distance (NT d) const
 Returns \( d^{1/2}\). More...
 

Member Typedef Documentation

◆ D

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

Dimension Tag.

◆ FT

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

Number type.

◆ Point_d

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

Point type.

◆ Sphere_d

template<typename Traits >
typedef Traits::Sphere_d CGAL::Euclidean_distance_sphere_point< Traits >::Sphere_d

Query item type.

Constructor & Destructor Documentation

◆ Euclidean_distance_sphere_point()

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

Default constructor.

Member Function Documentation

◆ inverse_of_transformed_distance()

template<typename Traits >
NT CGAL::Euclidean_distance_sphere_point< Traits >::inverse_of_transformed_distance ( NT  d) const

Returns \( d^{1/2}\).

◆ max_distance_to_rectangle()

template<typename Traits >
NT CGAL::Euclidean_distance_sphere_point< Traits >::max_distance_to_rectangle ( Query_item  s,
Kd_tree_rectangle< FT, D r 
) const

Returns the maximal distance between the sphere s and a point from r furthest to s.

◆ min_distance_to_rectangle()

template<typename Traits >
NT CGAL::Euclidean_distance_sphere_point< Traits >::min_distance_to_rectangle ( Query_item  s,
Kd_tree_rectangle< FT, D r 
) const

Returns the minimal distance between a point from the sphere s and a point from r.

◆ transformed_distance() [1/2]

template<typename Traits >
NT CGAL::Euclidean_distance_sphere_point< Traits >::transformed_distance ( NT  d) const

Returns \( d^2\).

◆ transformed_distance() [2/2]

template<typename Traits >
NT CGAL::Euclidean_distance_sphere_point< Traits >::transformed_distance ( Query_item  s,
Point_d  p 
) const

Returns the distance between s and p.