DGtal  1.2.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes
DGtal::detail::PointOnProbingRay< Integer > Class Template Reference

#include <DGtal/geometry/helpers/PlaneProbingEstimatorHelper.h>

Public Types

using Permutation = std::array< int, 3 >
 

Public Member Functions

 PointOnProbingRay ()=default
 
 PointOnProbingRay (Permutation const &aSigma, Integer const &aIndex=Integer(0))
 
PointOnProbingRay getBase () const
 
Permutation const & sigma () const
 
int sigma (int aIndex) const
 
Integer const & index () const
 
bool operator== (PointOnProbingRay const &aRay) const
 
bool operator!= (PointOnProbingRay const &aRay) const
 
bool operator<= (PointOnProbingRay const &aRay) const
 
PointOnProbingRay next (Integer const &aInc) const
 
PointOnProbingRay previous (Integer const &aDec) const
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CInteger< Integer >))
 

Private Attributes

Permutation mySigma
 
Integer myIndex
 

Detailed Description

template<typename Integer = int>
class DGtal::detail::PointOnProbingRay< Integer >

Description of template class 'PointOnProbingRay'

A ray consists of a permutation \( \sigma \) and an integer index \( \lambda \) (position on the ray). For a triplet of vectors \( (m_k)_{0 \leq k \leq 2} \) and a point \( q \), a point on the ray is defined as: \( q - m_{\sigma(0)} + m_{\sigma(1)} + \lambda m_{\sigma(2)} \). \( q - m_{\sigma(0)} + m_{\sigma(1)} \) is called the base point.

This class is used to represent points on rays for a plane-probing estimator, so in practice the point \( q \) is the fixed point and the three vectors \( (m_k)_{0 \leq k \leq 2} \) are the vectors defining the current probing frame.

Template Parameters
Integerthe integer type, model of concepts::CInteger.

Definition at line 107 of file PlaneProbingEstimatorHelper.h.

Member Typedef Documentation

◆ Permutation

template<typename Integer = int>
using DGtal::detail::PointOnProbingRay< Integer >::Permutation = std::array<int, 3>

Definition at line 113 of file PlaneProbingEstimatorHelper.h.

Constructor & Destructor Documentation

◆ PointOnProbingRay() [1/2]

template<typename Integer = int>
DGtal::detail::PointOnProbingRay< Integer >::PointOnProbingRay ( )
default

Default constructor.

◆ PointOnProbingRay() [2/2]

template<typename Integer = int>
DGtal::detail::PointOnProbingRay< Integer >::PointOnProbingRay ( Permutation const &  aSigma,
Integer const &  aIndex = Integer(0) 
)

Constructs a ray with a permutation and an index.

Parameters
aSigmaa permutation.
aIndexan index.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

template<typename Integer = int>
DGtal::detail::PointOnProbingRay< Integer >::BOOST_CONCEPT_ASSERT ( (concepts::CInteger< Integer >)  )
private

◆ getBase()

template<typename Integer = int>
PointOnProbingRay DGtal::detail::PointOnProbingRay< Integer >::getBase ( ) const
Returns
the base point of the ray (with index 0).

◆ index()

template<typename Integer = int>
Integer const& DGtal::detail::PointOnProbingRay< Integer >::index ( ) const
Returns
index of the current point on the ray.

◆ next()

template<typename Integer = int>
PointOnProbingRay DGtal::detail::PointOnProbingRay< Integer >::next ( Integer const &  aInc) const
Parameters
aIncan increment.
Returns
a new point on a ray, with index the current index incremented by aInc.

◆ operator!=()

template<typename Integer = int>
bool DGtal::detail::PointOnProbingRay< Integer >::operator!= ( PointOnProbingRay< Integer > const &  aRay) const

Inequality test between two rays.

Parameters
aRayan other ray.
Returns
true if the two rays are different, false otherwise.

◆ operator<=()

template<typename Integer = int>
bool DGtal::detail::PointOnProbingRay< Integer >::operator<= ( PointOnProbingRay< Integer > const &  aRay) const

Comparison operator between two rays: one ray is less than another if they have the same internal permutation and the first one has a smaller index than the second one.

Parameters
aRayan other ray.
Returns
true if *this <= aRay, false otherwise.

◆ operator==()

template<typename Integer = int>
bool DGtal::detail::PointOnProbingRay< Integer >::operator== ( PointOnProbingRay< Integer > const &  aRay) const

Equality test between two rays: the internal permutations and indices must be the same.

Parameters
aRayan other ray.
Returns
true if the two rays are the same, false otherwise.

◆ previous()

template<typename Integer = int>
PointOnProbingRay DGtal::detail::PointOnProbingRay< Integer >::previous ( Integer const &  aDec) const
Parameters
aDeca decrement.
Returns
a new point on a ray, with index the current index decremented by aInc.

◆ sigma() [1/2]

template<typename Integer = int>
Permutation const& DGtal::detail::PointOnProbingRay< Integer >::sigma ( ) const
Returns
the permutation that defines the ray.

◆ sigma() [2/2]

template<typename Integer = int>
int DGtal::detail::PointOnProbingRay< Integer >::sigma ( int  aIndex) const
Parameters
aIndexan index between 0 and 2.
Returns
the i-th element of the permutation that defines the ray.

Field Documentation

◆ myIndex

template<typename Integer = int>
Integer DGtal::detail::PointOnProbingRay< Integer >::myIndex
private

The index.

Definition at line 192 of file PlaneProbingEstimatorHelper.h.

◆ mySigma

template<typename Integer = int>
Permutation DGtal::detail::PointOnProbingRay< Integer >::mySigma
private

The permutation.

Definition at line 191 of file PlaneProbingEstimatorHelper.h.


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