struct DGtal::concepts::CPowerMetric< T >
Aim: defines the concept of special weighted metrics, so called power metrics.
Description of concept 'CPowerMetric'
Associated types :
- Space: type of space on which the premetric is defined (model of CSpace)
- Weight: type for weights associated to the power metric (model of CQuantity)
- Value: type for power distance value (model of CQuantity)
- X : A type that is a model of CPowerMetric
- x, y : object of type X
Valid expressions and semantics
|Name ||Expression ||Type requirements ||Return type ||Precondition ||Semantics ||Post condition ||Complexity |
|power distance computation ||x.powerDistance(aPoint, anotherPoint, anotherWeight) ||aPoint and anotherPoint of type Point, aWeight of type Weight ||a value of type Weight ||compute the power distance between a point and a weighted point ||- |
|closest point test ||closestPower(aOrigin, aP, aWp, aQ, aWq) ||aOrigin, aP,aQ of type aPoint, aWp,aWq of type Weight ||a value of type Closest ||decide between weighted points aP and aQ which one is closer to the origin. This functions returns either DGtal::ClosestFIRST if aP is closer, DGtal::ClosestSECOND if aQ is closer and DGtal::ClosestBOTH if both are equidistant.||- |
- Template Parameters
Definition at line 98 of file CPowerMetric.h.