DGtal 1.3.0
|
#include <DGtal/geometry/volumes/distance/ExactPredicateLpPowerSeparableMetric.h>
Public Types | |
typedef TSpace | Space |
Copy the space type. More... | |
typedef Space::Point | Point |
Type for points. More... | |
typedef Point::Coordinate | Abscissa |
Type for points. More... | |
typedef Space::Vector | Vector |
Type for vectors. More... | |
typedef TPromoted | Promoted |
Type for internal distance values. More... | |
typedef TPromoted | Weight |
Type for internal distance values. More... | |
typedef TPromoted | Value |
Type for Value (alias) More... | |
Public Member Functions | |
ExactPredicateLpPowerSeparableMetric () | |
~ExactPredicateLpPowerSeparableMetric () | |
ExactPredicateLpPowerSeparableMetric (const ExactPredicateLpPowerSeparableMetric &) | |
ExactPredicateLpPowerSeparableMetric & | operator= (const ExactPredicateLpPowerSeparableMetric &) |
Weight | powerDistance (const Point &aPoint, const Point &aQ, const Weight &aWq) const |
DGtal::Closest | closestPower (const Point &origin, const Point &first, const Weight &wF, const Point &second, const Weight &wS) const |
Promoted | exactDistanceRepresentation (const Point &aP, const Point &aQ) const |
bool | hiddenByPower (const Point &u, const Weight &wu, const Point &v, const Weight &wv, const Point &w, const Weight &ww, const Point &startingPoint, const Point &endPoint, const typename Point::UnsignedComponent dim) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Private Member Functions | |
Abscissa | binarySearchHidden (const Abscissa &udim, const Abscissa &vdim, const Promoted &nu, const Promoted &nv, const Abscissa &lower, const Abscissa &upper) const |
Definition at line 280 of file ExactPredicateLpPowerSeparableMetric.h.
typedef Point::Coordinate DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::Abscissa |
Type for points.
Definition at line 290 of file ExactPredicateLpPowerSeparableMetric.h.
typedef Space::Point DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::Point |
Type for points.
Definition at line 288 of file ExactPredicateLpPowerSeparableMetric.h.
typedef TPromoted DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::Promoted |
Type for internal distance values.
Definition at line 295 of file ExactPredicateLpPowerSeparableMetric.h.
typedef TSpace DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::Space |
Copy the space type.
Definition at line 286 of file ExactPredicateLpPowerSeparableMetric.h.
typedef TPromoted DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::Value |
Type for Value (alias)
Definition at line 301 of file ExactPredicateLpPowerSeparableMetric.h.
typedef Space::Vector DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::Vector |
Type for vectors.
Definition at line 292 of file ExactPredicateLpPowerSeparableMetric.h.
typedef TPromoted DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::Weight |
Type for internal distance values.
Definition at line 298 of file ExactPredicateLpPowerSeparableMetric.h.
DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::ExactPredicateLpPowerSeparableMetric | ( | ) |
Constructor.
DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::~ExactPredicateLpPowerSeparableMetric | ( | ) |
Destructor.
|
inline |
|
private |
Perform a binary search on the interval [lower,upper] to detect the mid-point between u and v according to the l_p distance.
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 |
DGtal::Closest DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::closestPower | ( | const Point & | origin, |
const Point & | first, | ||
const Weight & | wF, | ||
const Point & | second, | ||
const Weight & | wS | ||
) | const |
Given an origin and two weighted points, this method decides which one is closest to the origin. This method should be faster than comparing distance values.
origin | the origin |
first | the first point |
wF | the first point weight |
second | the second point |
wS | the second point weight $ |
Promoted DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::exactDistanceRepresentation | ( | const Point & | aP, |
const Point & | aQ | ||
) | const |
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.
aP | a first point |
aQ | a second point |
bool DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::hiddenByPower | ( | const Point & | u, |
const Weight & | wu, | ||
const Point & | v, | ||
const Weight & | wv, | ||
const Point & | w, | ||
const Weight & | ww, | ||
const Point & | startingPoint, | ||
const Point & | endPoint, | ||
const typename Point::UnsignedComponent | dim | ||
) | const |
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.
u | a site |
wu | a weight |
v | a site |
wv | a weight |
w | a site |
ww | a weight |
startingPoint | starting point of the segment |
endPoint | end point of the segment |
dim | direction of the straight line |
bool DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::isValid | ( | ) | const |
Checks the validity/consistency of the object.
|
inline |
Assignment.
Definition at line 323 of file ExactPredicateLpPowerSeparableMetric.h.
Weight DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::powerDistance | ( | const Point & | aPoint, |
const Point & | aQ, | ||
const Weight & | aWq | ||
) | const |
Return the power distance of a point aPoint and a weighted point (aQ,aWq)
aPoint | aPoint |
aQ | another point |
aWq | wieght of øa aQ |
void DGtal::ExactPredicateLpPowerSeparableMetric< TSpace, 2, TPromoted >::selfDisplay | ( | std::ostream & | out | ) | const |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |