#include <DGtal/geometry/volumes/distance/ExactPredicateLpSeparableMetric.h>
|
| ExactPredicateLpSeparableMetric () |
|
| ~ExactPredicateLpSeparableMetric () |
|
| ExactPredicateLpSeparableMetric (const Self &other) |
|
Self & | operator= (const Self &other) |
|
Value | local (const Point &aP, const Vector &aDir) const |
|
Value | operator() (const Point &aP, const Point &aQ) const |
|
Closest | closest (const Point &origin, const Point &first, const Point &second) const |
|
RawValue | rawDistance (const Point &aP, const Point &aQ) const |
|
bool | hiddenBy (const Point &u, const Point &v, const Point &w, const Point &startingPoint, const Point &endPoint, const typename Point::UnsignedComponent dim) const |
|
void | selfDisplay (std::ostream &out) const |
|
bool | isValid () const |
|
template<typename TSpace, typename TRawValue>
class DGtal::ExactPredicateLpSeparableMetric< TSpace, 2, TRawValue >
Definition at line 261 of file ExactPredicateLpSeparableMetric.h.
◆ Abscissa
template<typename TSpace , typename TRawValue >
◆ Point
template<typename TSpace , typename TRawValue >
◆ RawValue
template<typename TSpace , typename TRawValue >
◆ Self
template<typename TSpace , typename TRawValue >
◆ Space
template<typename TSpace , typename TRawValue >
◆ Value
template<typename TSpace , typename TRawValue >
◆ Vector
template<typename TSpace , typename TRawValue >
◆ ExactPredicateLpSeparableMetric() [1/2]
template<typename TSpace , typename TRawValue >
◆ ~ExactPredicateLpSeparableMetric()
template<typename TSpace , typename TRawValue >
◆ ExactPredicateLpSeparableMetric() [2/2]
template<typename TSpace , typename TRawValue >
Copy constructor.
- Parameters
-
other | the object to clone (not used). |
Definition at line 300 of file ExactPredicateLpSeparableMetric.h.
302 boost::ignore_unused_variable_warning( other );
◆ binarySearchHidden()
template<typename TSpace , typename TRawValue >
Perform a binary search on the interval [lower,upper] to detect the mid-point between u and v according to the l_p distance.
- Parameters
-
udim | coordinate of u along dimension dim |
vdim | coordinate of v along dimension dim |
nu | partial distance of u (sum of |xj-x_i|^p) discarding the term along the dimension dim |
nv | partial distance of v (sum of |xj-x_i|^p) discarding the term along the dimension dim |
lower | interval lower bound |
upper | interval upper bound |
- Returns
- the Voronoi boundary point coordinates along dimension dim.
◆ closest()
template<typename TSpace , typename TRawValue >
Given an origin and two points, this method decides which one is closest to the origin. This method should be faster than comparing distance values.
- Parameters
-
origin | the origin |
first | the first point |
second | the second point |
- Returns
- a Closest enum: FIRST, SECOND or BOTH.
◆ hiddenBy()
template<typename TSpace , typename TRawValue >
Given three sites (a,b,c) and a straight segment [startingPoint,endPoint] along dimension dim, we detect if the voronoi cells of a and c hide the voronoi cell of c on the straight line.
- Precondition
- both voronoi cells associated with a and b must intersect the straight line.
- Parameters
-
u | a site |
v | a site |
w | a site |
startingPoint | starting point of the segment |
endPoint | end point of the segment |
dim | direction of the straight line |
- Returns
- true if (a,c) hides b.
◆ isValid()
template<typename TSpace , typename TRawValue >
Checks the validity/consistency of the object.
- Returns
- 'true' if the object is valid, 'false' otherwise.
◆ local()
template<typename TSpace , typename TRawValue >
Compute the local distance between aP and its displacement along the direction aDir.
- Parameters
-
aP | a point. |
aDir | a direction. |
- Returns
- the distance between aP and aP+aDir.
◆ operator()()
template<typename TSpace , typename TRawValue >
Compute the distance between aP and aQ.
- Parameters
-
aP | a first point. |
aQ | a second point. |
- Returns
- the distance between aP and aQ.
◆ operator=()
template<typename TSpace , typename TRawValue >
Assignment.
- Parameters
-
other | the object to copy (unused). |
- Returns
- a reference on 'this'.
Definition at line 310 of file ExactPredicateLpSeparableMetric.h.
312 boost::ignore_unused_variable_warning( other );
◆ rawDistance()
template<typename TSpace , typename TRawValue >
Compute an exact representation of Lp distances. We just return the sum of powers without computing the last 1/p power. I.e. only \( \sum |p_i- q_i|^p\) is given.
- Parameters
-
aP | a first point |
aQ | a second point |
- Returns
- the power p of the l_p distance between aP and aQ.
◆ selfDisplay()
template<typename TSpace , typename TRawValue >
Writes/Displays the object on an output stream.
- Parameters
-
out | the output stream where the object is written. |
The documentation for this class was generated from the following file: