DGtal  1.2.0
DGtal::concepts::CPowerMetric< T > Struct Template Reference

Aim: defines the concept of special weighted metrics, so called power metrics. More...

#include <DGtal/geometry/volumes/distance/CPowerMetric.h>

Inheritance diagram for DGtal::concepts::CPowerMetric< T >:
[legend]

## Public Types

typedef T::Space Space

typedef T::Weight Weight

typedef T::Value Value

typedef T::Point Point

## Public Member Functions

BOOST_CONCEPT_ASSERT ((CSpace< Space >))

BOOST_CONCEPT_ASSERT ((CQuantity< Value >))

BOOST_CONCEPT_ASSERT ((CQuantity< Weight >))

BOOST_CONCEPT_USAGE (CPowerMetric)

void checkConstConstraints () const

## Private Attributes

myX

Point myPoint

Point myPoint2

Point myPoint3

Value myValue

Weight myW1

Weight myW2

Weight myW3

DGtal::Closest aclosest

## Detailed Description

### template<typename T> struct DGtal::concepts::CPowerMetric< T >

Aim: defines the concept of special weighted metrics, so called power metrics.

Description of concept 'CPowerMetric'

# Refinement of

boost::CopyConstructible<T>, boost::Assignable<T>

# 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)

# Notation

• 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. -

# Models

ExactPredicateLpPowerSeparableMetric

# Notes

Template Parameters
 T the type that should be a model of CPowerMetric.

Definition at line 98 of file CPowerMetric.h.

## ◆ Point

template<typename T >
 typedef T::Point DGtal::concepts::CPowerMetric< T >::Point

Definition at line 105 of file CPowerMetric.h.

## ◆ Space

template<typename T >
 typedef T::Space DGtal::concepts::CPowerMetric< T >::Space

Definition at line 102 of file CPowerMetric.h.

## ◆ Value

template<typename T >
 typedef T::Value DGtal::concepts::CPowerMetric< T >::Value

Definition at line 104 of file CPowerMetric.h.

## ◆ Weight

template<typename T >
 typedef T::Weight DGtal::concepts::CPowerMetric< T >::Weight

Definition at line 103 of file CPowerMetric.h.

## ◆ BOOST_CONCEPT_ASSERT() [1/3]

template<typename T >
 DGtal::concepts::CPowerMetric< T >::BOOST_CONCEPT_ASSERT ( (CQuantity< Value >) )

## ◆ BOOST_CONCEPT_ASSERT() [2/3]

template<typename T >
 DGtal::concepts::CPowerMetric< T >::BOOST_CONCEPT_ASSERT ( (CQuantity< Weight >) )

## ◆ BOOST_CONCEPT_ASSERT() [3/3]

template<typename T >
 DGtal::concepts::CPowerMetric< T >::BOOST_CONCEPT_ASSERT ( (CSpace< Space >) )

## ◆ BOOST_CONCEPT_USAGE()

template<typename T >
 DGtal::concepts::CPowerMetric< T >::BOOST_CONCEPT_USAGE ( CPowerMetric< T > )
inline

Definition at line 112 of file CPowerMetric.h.

113  {
115  }

## ◆ checkConstConstraints()

template<typename T >
 void DGtal::concepts::CPowerMetric< T >::checkConstConstraints ( ) const
inline

## ◆ aclosest

template<typename T >
 DGtal::Closest DGtal::concepts::CPowerMetric< T >::aclosest
private

Definition at line 128 of file CPowerMetric.h.

## ◆ myPoint

template<typename T >
 Point DGtal::concepts::CPowerMetric< T >::myPoint
private

Definition at line 125 of file CPowerMetric.h.

## ◆ myPoint2

template<typename T >
 Point DGtal::concepts::CPowerMetric< T >::myPoint2
private

Definition at line 125 of file CPowerMetric.h.

## ◆ myPoint3

template<typename T >
 Point DGtal::concepts::CPowerMetric< T >::myPoint3
private

Definition at line 125 of file CPowerMetric.h.

## ◆ myValue

template<typename T >
 Value DGtal::concepts::CPowerMetric< T >::myValue
private

Definition at line 126 of file CPowerMetric.h.

## ◆ myW1

template<typename T >
 Weight DGtal::concepts::CPowerMetric< T >::myW1
private

Definition at line 127 of file CPowerMetric.h.

## ◆ myW2

template<typename T >
 Weight DGtal::concepts::CPowerMetric< T >::myW2
private

Definition at line 127 of file CPowerMetric.h.

## ◆ myW3

template<typename T >
 Weight DGtal::concepts::CPowerMetric< T >::myW3
private

Definition at line 127 of file CPowerMetric.h.

## ◆ myX

template<typename T >
 T DGtal::concepts::CPowerMetric< T >::myX
private

Definition at line 124 of file CPowerMetric.h.

The documentation for this struct was generated from the following file: