DGtal  1.1.0
DGtal::concepts::COrientationFunctor< T > Struct Template Reference

Aim: This concept gathers models implementing an orientation test of $$k+1$$ points in a space of dimension $$n$$. More...

#include <DGtal/geometry/tools/determinant/COrientationFunctor.h>

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

## Public Types

typedef T::PointArray PointArray

typedef T::SizeArray SizeArray

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

typedef T::Value Value

## Public Member Functions

BOOST_CONCEPT_ASSERT ((concepts::CSignedNumber< typename T::Value >))

BOOST_CONCEPT_USAGE (COrientationFunctor)

Public Member Functions inherited from DGtal::concepts::CUnaryFunctor< T, T::Point, T::Value >
BOOST_CONCEPT_USAGE (CUnaryFunctor)

myX

PointArray myA

SizeArray myS

## Detailed Description

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

Aim: This concept gathers models implementing an orientation test of $$k+1$$ points in a space of dimension $$n$$.

Description of concept 'COrientationFunctor'

The orientation of $$k+1$$ points $$(p_1, \ldots, p_{k+1})$$ is given by the sign of the algebraic distance between $$p_{k+1}$$ and an algebraic variety, chosen such that it is uniquely defined by the first $$k$$ points $$(p_1, \ldots, p_{k})$$.

These $$k+1$$ points are provided in two steps so that this concept is a refinement of CPointFunctor:

• First, we set the first $$k$$ points by a method 'init'.
• Then, we look at the position of the $$k+1$$ -th point with respect to the first $$k$$ ones: the parenthesis operator takes an input point and returns a signed value.

The returned value, which is a model of CSignedNumber, is guaranteed to be:

• zero if the $$k+1$$ points belong to the same algebraic variety.
• strictly negative if $$k+1$$ -th point belongs to the interior of the algebraic variety defined by the first $$k$$ points.
• strictly positive if $$k+1$$ -th point belongs to the exterior of the algebraic variety defined by the first $$k$$ points.

# Associated types

As a refinement of CPointFunctor, it has the following nested types:

• Point type of input points
• Value type of the result, at least a model of CSignedNumbe

In addition it has the following inner types:

• PointArray a model of static array of k points
• Size type used for representing the size of the array

# Notation

• X : A type that is a model of COrientationFunctor
• x : object of type X
• a : object of type PointArray

# Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
array dimension X::size SizeArray size of the array, equal to k
initialization x.init(a) a is of type PointArray void implicitely set the algebraic curve model-dependent

# Models

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

Definition at line 113 of file COrientationFunctor.h.

## ◆ PointArray

template<typename T >
 typedef T::PointArray DGtal::concepts::COrientationFunctor< T >::PointArray

Definition at line 120 of file COrientationFunctor.h.

## ◆ SizeArray

template<typename T >
 typedef T::SizeArray DGtal::concepts::COrientationFunctor< T >::SizeArray

Definition at line 121 of file COrientationFunctor.h.

## ◆ BOOST_CONCEPT_ASSERT()

template<typename T >
 DGtal::concepts::COrientationFunctor< T >::BOOST_CONCEPT_ASSERT ( (concepts::CSignedNumber< typename T::Value >) )

## ◆ BOOST_CONCEPT_USAGE()

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

Definition at line 123 of file COrientationFunctor.h.

124  {
126  myX.init( myA );
127  }

## ◆ myA

template<typename T >
 private

Definition at line 131 of file COrientationFunctor.h.

## ◆ myS

template<typename T >
 private

Definition at line 132 of file COrientationFunctor.h.

## ◆ myX

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

Definition at line 130 of file COrientationFunctor.h.

The documentation for this struct was generated from the following file:
DGtal::concepts::COrientationFunctor::myS
SizeArray myS
Definition: COrientationFunctor.h:132
DGtal::concepts::COrientationFunctor::myX
T myX
Definition: COrientationFunctor.h:130
DGtal::concepts::COrientationFunctor::myA
PointArray myA
Definition: COrientationFunctor.h:131
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117