Public Types | Public Member Functions | Static Public Attributes

DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp > Struct Template Reference

Aim: Implements basic functions associated to metrics used by separable volumetric algorithms. More...

#include <SeparableMetricTraits.h>

Public Types

typedef TValueType ValueType
typedef TAbscissa Abscissa
typedef double InternalValueType

Public Member Functions

ValueType operator() (const InternalValueType &aInternalValueType) const
InternalValueType F (const Abscissa pos, const Abscissa ci, const InternalValueType hi) const
InternalValueType power (const Abscissa pos) const
Abscissa Sep (const Abscissa i, const InternalValueType hi, const Abscissa j, const InternalValueType hj) const

Static Public Attributes

static const DGtal::uint32_t p = tp

Detailed Description

template<typename TAbscissa, typename TValueType, DGtal::uint32_t tp>
struct DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >

Aim: Implements basic functions associated to metrics used by separable volumetric algorithms.

Description of template class 'SeparableMetricTraits'

Template Parameters:
TAbscissa Type used to store the coordinaites of the Domain.
TValueType the type of the input map.
tp the order p of the L_p metric.

Member Typedef Documentation

template<typename TAbscissa , typename TValueType , DGtal::uint32_t tp>
typedef TAbscissa DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::Abscissa
template<typename TAbscissa , typename TValueType , DGtal::uint32_t tp>
typedef double DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::InternalValueType

Default InternalType.

template<typename TAbscissa , typename TValueType , DGtal::uint32_t tp>
typedef TValueType DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::ValueType

Member Function Documentation

template<typename TAbscissa , typename TValueType , DGtal::uint32_t tp>
InternalValueType DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::F ( const Abscissa  pos,
const Abscissa  ci,
const InternalValueType  hi 
) const [inline]

Returns the height at a point pos of a Lp-parabola with center ci and height hi.

Parameters:
pos an abscissa.
ci center of the Lp-parabola.
hi height of the Lp-parabola.
Returns:
the height of the parabola (ci,hi) at pos.

References DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::p.

template<typename TAbscissa , typename TValueType , DGtal::uint32_t tp>
ValueType DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::operator() ( const InternalValueType aInternalValueType  )  const [inline]

Operator () in order to return the correct value from the InternalValuetype used to ensure exact computations.

Parameters:
aInternalValueType the internal value to convert
Returns:
the converted value.

References DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::p.

template<typename TAbscissa , typename TValueType , DGtal::uint32_t tp>
InternalValueType DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::power ( const Abscissa  pos  )  const [inline]

Returns the InternalValueType value of order p for a given position. Basically, its computes pos^p.

Parameters:
pos the value of type Abscissa
Returns:
the InternaValueType value.

References DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::p.

template<typename TAbscissa , typename TValueType , DGtal::uint32_t tp>
Abscissa DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::Sep ( const Abscissa  i,
const InternalValueType  hi,
const Abscissa  j,
const InternalValueType  hj 
) const [inline]

Returns the abscissa of the intersection point between two Lp-parabolas (ci,hi) and (cj,hj).

Parameters:
ci center of the first Lp-parabola.
hi height of the first Lp-parabola power p (hi = real height^p)
cj center of the first Lp-parabola.
hj height of the first Lp-parabola power p (hj = real height^p).
Returns:

References ASSERT.


Field Documentation

template<typename TAbscissa , typename TValueType , DGtal::uint32_t tp>
const DGtal::uint32_t DGtal::SeparableMetricTraits< TAbscissa, TValueType, tp >::p = tp [static]

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