DGtal  1.5.beta
DGtal::concepts::CSeparableMetric< T > Struct Template Reference

Aim: defines the concept of separable metrics. More...

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

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

## Public Types

typedef T::Point Point

Public Types inherited from DGtal::concepts::CMetricSpace< T >
typedef T::Point Point

typedef T::Space Space

typedef T::Value Value

typedef T::RawValue RawValue

## Public Member Functions

BOOST_CONCEPT_USAGE (CSeparableMetric)

void checkConstConstraints () const

Public Member Functions inherited from DGtal::concepts::CMetricSpace< T >
BOOST_CONCEPT_ASSERT ((CSpace< Space >))

BOOST_CONCEPT_ASSERT ((CQuantity< Value >))

BOOST_CONCEPT_ASSERT ((CQuantity< RawValue >))

BOOST_CONCEPT_USAGE (CMetricSpace)

void checkConstConstraints () const

## Private Attributes

myX

Point u

Point v

Point w

Point start

Point end

bool myBool

DGtal::Dimension dim

## Detailed Description

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

Aim: defines the concept of separable metrics.

Description of concept 'CSeparableMetric'

Separable metrics are metrics satsifying the monotonicity property. More formally, in dimension 2, consider two points $$p(x,y)$$, $$q(x',y')$$ with $$x<x$$. Let $$r( x'',0)$$ be a point on the x-axis such that $$d(p,r) = d(q,r)$$ and $$s(u,0)$$ be another point on the x-axis. A metric $$d$$ is monotonic if

$u < x'' \implies d(p,s) \leq d(q,s)$

and

$u > x'' \implies d(p,s) \geq d(q,s)$

# Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
hiddenBy predicate hiddenBy(u,v,w,startingPoint,endPoint,dim) u,v,w,startingPoint,endPoint of type Point, dim of type DGtal::Dimension startingPoint and endPoint only differ by their dim-th coordinate returns true if the intersection between the segment [startingPoint,endPoint] and the Voronoi cell associated with v is empty (hidden on the segment by u and w Voronoi cells). -

# Notes

Template Parameters
 T the type that should be a model of concepts::CSeparableMetric.

Definition at line 101 of file CSeparableMetric.h.

## ◆ Point

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

Definition at line 105 of file CSeparableMetric.h.

## ◆ BOOST_CONCEPT_USAGE()

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

Definition at line 106 of file CSeparableMetric.h.

107  {
109  }

## ◆ checkConstConstraints()

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

Definition at line 110 of file CSeparableMetric.h.

111  {
112  // const method dummyConst should take parameter myA of type A and return
113  // something of type B
114  ConceptUtils::sameType( myBool, myX.hiddenBy(u,v,w,start,end,dim) );
115  }
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117

## ◆ dim

template<typename T >
 private

Definition at line 121 of file CSeparableMetric.h.

## ◆ end

template<typename T >
 Point DGtal::concepts::CSeparableMetric< T >::end
private

Definition at line 119 of file CSeparableMetric.h.

## ◆ myBool

template<typename T >
 bool DGtal::concepts::CSeparableMetric< T >::myBool
private

Definition at line 120 of file CSeparableMetric.h.

## ◆ myX

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

Definition at line 118 of file CSeparableMetric.h.

## ◆ start

template<typename T >
 Point DGtal::concepts::CSeparableMetric< T >::start
private

Definition at line 119 of file CSeparableMetric.h.

## ◆ u

template<typename T >
 private

Definition at line 119 of file CSeparableMetric.h.

## ◆ v

template<typename T >
 private

Definition at line 119 of file CSeparableMetric.h.

## ◆ w

template<typename T >
 private

Definition at line 119 of file CSeparableMetric.h.

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