DGtal  1.5.beta
DGtal::detail::PointOnProbingRay< Integer, Index > Class Template Reference

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

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

Public Types

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

Public Member Functions

 PointOnProbingRay ()=default
 
 PointOnProbingRay (Permutation const &aSigma, Integer const &aInt=Integer(0))
 
PointOnProbingRay getBase () const
 
Permutation const & sigma () const
 
Index sigma (Index const &aIndex) const
 
Integer const & position () const
 
template<typename Point >
Point relativePoint (std::array< Point, 3 > const &aM) 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 myPosition
 

Detailed Description

template<typename Integer = int, typename Index = std::size_t>
class DGtal::detail::PointOnProbingRay< Integer, Index >

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.

Description of template class 'PointOnProbingRay'

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 112 of file PlaneProbingEstimatorHelper.h.

Member Typedef Documentation

◆ Permutation

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

Definition at line 118 of file PlaneProbingEstimatorHelper.h.

Constructor & Destructor Documentation

◆ PointOnProbingRay() [1/2]

template<typename Integer = int, typename Index = std::size_t>
DGtal::detail::PointOnProbingRay< Integer, Index >::PointOnProbingRay ( )
default

Default constructor.

◆ PointOnProbingRay() [2/2]

template<typename Integer = int, typename Index = std::size_t>
DGtal::detail::PointOnProbingRay< Integer, Index >::PointOnProbingRay ( Permutation const &  aSigma,
Integer const &  aInt = Integer(0) 
)

Constructs a ray with a permutation and an index.

Parameters
aSigmaa permutation.
aIntan integer that determines a point along the ray.

Member Function Documentation

◆ BOOST_CONCEPT_ASSERT()

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

◆ getBase()

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

◆ next()

template<typename Integer = int, typename Index = std::size_t>
PointOnProbingRay DGtal::detail::PointOnProbingRay< Integer, Index >::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, typename Index = std::size_t>
bool DGtal::detail::PointOnProbingRay< Integer, Index >::operator!= ( PointOnProbingRay< Integer, Index > 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, typename Index = std::size_t>
bool DGtal::detail::PointOnProbingRay< Integer, Index >::operator<= ( PointOnProbingRay< Integer, Index > 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, typename Index = std::size_t>
bool DGtal::detail::PointOnProbingRay< Integer, Index >::operator== ( PointOnProbingRay< Integer, Index > 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.

◆ position()

template<typename Integer = int, typename Index = std::size_t>
Integer const& DGtal::detail::PointOnProbingRay< Integer, Index >::position ( ) const
Returns
integer that locates the current point on the ray.

◆ previous()

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

◆ relativePoint()

template<typename Integer = int, typename Index = std::size_t>
template<typename Point >
Point DGtal::detail::PointOnProbingRay< Integer, Index >::relativePoint ( std::array< Point, 3 > const &  aM) const

Returns the geometric realization of this grid point.

Parameters
aMan array of three points.
Template Parameters
Pointa type for points.
Returns
the computed point.

◆ sigma() [1/2]

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

◆ sigma() [2/2]

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

Field Documentation

◆ myPosition

template<typename Integer = int, typename Index = std::size_t>
Integer DGtal::detail::PointOnProbingRay< Integer, Index >::myPosition
private

The index.

Definition at line 207 of file PlaneProbingEstimatorHelper.h.

◆ mySigma

template<typename Integer = int, typename Index = std::size_t>
Permutation DGtal::detail::PointOnProbingRay< Integer, Index >::mySigma
private

The permutation.

Definition at line 206 of file PlaneProbingEstimatorHelper.h.


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