CGAL 5.1 - dD Spatial Searching
|
#include <CGAL/Euclidean_distance.h>
The class Euclidean_distance
provides an implementation of the concept OrthogonalDistance
, with the Euclidean distance ( \( l_2\) metric). To optimize distance computations squared distances are used.
Traits | must be a model of the concept SearchTraits , for example Search_traits_2<Simple_cartesian<double> > . |
OrthogonalDistance
CGAL::Weighted_Minkowski_distance<Traits>
Types | |
typedef Traits::Dimension | D |
Dimension Tag. More... | |
typedef Traits::FT | FT |
Number type. More... | |
typedef Traits::Point_d | Point_d |
Point type. More... | |
typedef Point_d | Query_item |
Query item type. More... | |
Creation | |
Euclidean_distance (Traits t=Traits()) | |
Default constructor. More... | |
Operations | |
FT | transformed_distance (Query_item q, Point_d p) const |
Returns the squared Euclidean distance between q and p . More... | |
template<typename Coord_iterator > | |
FT | transformed_distance_from_coordinates (Query_item q, Coord_iterator begin, Coord_iterator end) const |
Returns the transformed distance between q and the point whose Cartesian coordinates are contained in the range [begin , end ). More... | |
template<typename Coord_iterator > | |
FT | interruptible_transformed_distance (Query_item q, Coord_iterator begin, Coord_iterator end, FT stop_if_geq_to_this) const |
Returns the transformed distance between q and the point whose Cartesian coordinates are contained in the range [begin , end ), or any value \( \geq \) stop_if_geq_to_this if the transformed distance is \( \geq \) stop_if_geq_to_this . More... | |
FT | min_distance_to_rectangle (Query_item q, Kd_tree_rectangle< FT, D > r) const |
Returns the squared Euclidean distance between q and the point on the boundary of r closest to q . More... | |
FT | min_distance_to_rectangle (Query_item q, Kd_tree_rectangle< FT, D > r, vector< FT > &dists) |
Returns the squared Euclidean distance between q and the point on the boundary of r closest to q . More... | |
FT | max_distance_to_rectangle (Query_item q, Kd_tree_rectangle< FT, D > r) const |
Returns the squared Euclidean distance, where \( d\) denotes the distance between q and the point on the boundary of r farthest to q . More... | |
FT | max_distance_to_rectangle (Query_item q, Kd_tree_rectangle< FT, D > r, vector< FT > &dists) |
Returns the squared Euclidean distance, where \( d\) denotes the distance between q and the point on the boundary of r farthest to q . More... | |
FT | new_distance (FT dist, FT old_off, FT new_off, int cutting_dimension) const |
Updates the squared dist incrementally and returns the updated squared distance. More... | |
FT | transformed_distance (FT d) const |
Returns \( d^2\). More... | |
FT | inverse_of_transformed_distance (FT d) const |
Returns \( d^{1/2}\). More... | |
typedef Traits::Dimension CGAL::Euclidean_distance< Traits >::D |
Dimension Tag.
typedef Traits::FT CGAL::Euclidean_distance< Traits >::FT |
Number type.
typedef Traits::Point_d CGAL::Euclidean_distance< Traits >::Point_d |
Point type.
typedef Point_d CGAL::Euclidean_distance< Traits >::Query_item |
Query item type.
CGAL::Euclidean_distance< Traits >::Euclidean_distance | ( | Traits | t = Traits() | ) |
Default constructor.
FT CGAL::Euclidean_distance< Traits >::interruptible_transformed_distance | ( | Query_item | q, |
Coord_iterator | begin, | ||
Coord_iterator | end, | ||
FT | stop_if_geq_to_this | ||
) | const |
Returns the transformed distance between q
and the point whose Cartesian coordinates are contained in the range [begin
, end
), or any value \( \geq \) stop_if_geq_to_this
if the transformed distance is \( \geq \) stop_if_geq_to_this
.
FT CGAL::Euclidean_distance< Traits >::inverse_of_transformed_distance | ( | FT | d | ) | const |
Returns \( d^{1/2}\).
FT CGAL::Euclidean_distance< Traits >::max_distance_to_rectangle | ( | Query_item | q, |
Kd_tree_rectangle< FT, D > | r | ||
) | const |
Returns the squared Euclidean distance, where \( d\) denotes the distance between q
and the point on the boundary of r
farthest to q
.
FT CGAL::Euclidean_distance< Traits >::max_distance_to_rectangle | ( | Query_item | q, |
Kd_tree_rectangle< FT, D > | r, | ||
vector< FT > & | dists | ||
) |
Returns the squared Euclidean distance, where \( d\) denotes the distance between q
and the point on the boundary of r
farthest to q
.
Stores the distances in each dimension in dists
.
FT CGAL::Euclidean_distance< Traits >::min_distance_to_rectangle | ( | Query_item | q, |
Kd_tree_rectangle< FT, D > | r | ||
) | const |
Returns the squared Euclidean distance between q
and the point on the boundary of r
closest to q
.
FT CGAL::Euclidean_distance< Traits >::min_distance_to_rectangle | ( | Query_item | q, |
Kd_tree_rectangle< FT, D > | r, | ||
vector< FT > & | dists | ||
) |
Returns the squared Euclidean distance between q
and the point on the boundary of r
closest to q
.
Stores the distances in each dimension in dists
.
FT CGAL::Euclidean_distance< Traits >::new_distance | ( | FT | dist, |
FT | old_off, | ||
FT | new_off, | ||
int | cutting_dimension | ||
) | const |
Updates the squared dist
incrementally and returns the updated squared distance.
FT CGAL::Euclidean_distance< Traits >::transformed_distance | ( | FT | d | ) | const |
Returns \( d^2\).
FT CGAL::Euclidean_distance< Traits >::transformed_distance | ( | Query_item | q, |
Point_d | p | ||
) | const |
Returns the squared Euclidean distance between q
and p
.
FT CGAL::Euclidean_distance< Traits >::transformed_distance_from_coordinates | ( | Query_item | q, |
Coord_iterator | begin, | ||
Coord_iterator | end | ||
) | const |
Returns the transformed distance between q
and the point whose Cartesian coordinates are contained in the range [begin
, end
).