DGtal 2.0.0
Loading...
Searching...
No Matches
DGtal::OneBalancedWordComputer< TConstIterator, TInteger > Class Template Reference

Aim: More...

#include <DGtal/geometry/curves/OneBalancedWordComputer.h>

Inheritance diagram for DGtal::OneBalancedWordComputer< TConstIterator, TInteger >:
[legend]

Data Structures

class  CodeHandler
class  CodeHandler< TIterator, BidirectionalCategory >
class  CodeHandler< TIterator, RandomAccessCategory >
struct  ConstPointIterator

Public Types

typedef TConstIterator ConstIterator
typedef TInteger Integer
typedef FreemanChain< TInteger > FreemanChainCode
typedef OneBalancedWordComputer< ConstIterator, IntegerSelf
typedef OneBalancedWordComputer< ConstIterator, IntegerReverse
typedef DGtal::PointVector< 2, IntegerPoint
typedef DGtal::PointVector< 2, IntegerVector
typedef IteratorCirculatorTraits< ConstIterator >::Value Code
typedef int Size
typedef int Index
typedef Vector(* DisplacementFct) (Code)
typedef ArithmeticalDSL< TInteger, TInteger, 4 > DSL

Public Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CInteger< TInteger >))
 OneBalancedWordComputer ()
 ~OneBalancedWordComputer ()
void init (const ConstIterator &it, const Point &start=Point(0, 0), Vector(*displacements)(Code)=defaultMoves)
void init (const ConstPointIterator &i)
void init (const FreemanChainCode &fc)
void init (const typename FreemanChainCode::ConstIterator &it)
 OneBalancedWordComputer (const Self &other)
OneBalancedWordComputeroperator= (const Self &other)
Self getSelf () const
bool operator== (const Self &other) const
bool operator!= (const Self &other) const
Reverse getReverse () const
bool isExtendableFront ()
bool extendFront ()
bool extendBack ()
bool isExtendableBack ()
bool retractBack ()
bool retractFront ()
void setPosition (const Point &p)
void translate (const Vector &v)
DSL getArithmeticalDescription () const
Integer getA () const
Integer getB () const
Integer getMu () const
Integer getOmega () const
Integer remainder (const Point &aPoint) const
void computeLeaningPoints (Point &uf, Point &ul, Point &lf, Point &ll) const
Point Uf () const
Point Ul () const
Point Lf () const
Point Ll () const
bool isValid () const
bool longestChristoffelPrefix (ConstIterator it, const OrderedAlphabet &aOA)
Point back () const
Point front () const
ConstPointIterator pointBegin () const
ConstPointIterator pointEnd () const
ConstIterator begin () const
ConstIterator end () const
void selfDisplay (std::ostream &out) const
Code getSmallLetter () const
Code getBigLetter () const
Code getCode (Index pos)
Code getCode (Index pos) const
Size mainPatternLength () const
Vector mainPatternVector () const
Size suffixLength () const
Size prefixLength () const
bool isUL (Index pos) const
bool nextIsLL (Index pos) const
bool previousIsLL (Index pos) const
bool isTrivial () const
Vector displacement (Code c) const

Static Public Member Functions

static Vector defaultMoves (Code c)

Protected Attributes

CodeHandler< ConstIteratormyCodeHandler
ConstIterator myBegin
ConstIterator myEnd
Point myFirstPoint
Point myLastPoint
Index myFirstLetter
Index myLastLetter
unsigned int myNbRepeat
Index myPatternBegin
Index myPatternEnd
Size myLeftPatternLength
Index myNextBefore
Index myNextAfter
Vector(* myDisplacements )(Code)

Detailed Description

template<typename TConstIterator, typename TInteger>
class DGtal::OneBalancedWordComputer< TConstIterator, TInteger >

Aim:

Description of template class 'OneBalancedWordComputer'

A combinatorial DSS is a specialized type of 4-connected DSS that reads codes of a Freeman chain as input.

In general, the Freeman coding of a 4-connected DSS has the following form : 's.c^k.p' where 'k>0', 'c' is a Christoffel word, 's' is a suffix of 'c' and 'p' a prefix of 'c'.

More precisely 'c' codes the path between two consecutive upper leaning points so the only exceptions are where the DSS is parallel to one of the axes , in this case the DSS is called 'trivial', and when the DSS has only one upper leaning point.

This class is a model of the concept CBidirectionalSegmentComputer.

Template Parameters
TConstIteratorthe type of iterator used to read the input codes (preferably of category 'random_access_iterator_tag').
TIntegerthe type of scalars used for the coordinates of the points (satisfying CInteger)

Definition at line 91 of file OneBalancedWordComputer.h.

Member Typedef Documentation

◆ Code

template<typename TConstIterator, typename TInteger>
typedef IteratorCirculatorTraits<ConstIterator>::Value DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Code

Definition at line 110 of file OneBalancedWordComputer.h.

◆ ConstIterator

template<typename TConstIterator, typename TInteger>
typedef TConstIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstIterator

Definition at line 98 of file OneBalancedWordComputer.h.

◆ DisplacementFct

template<typename TConstIterator, typename TInteger>
typedef Vector(* DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::DisplacementFct) (Code)

Definition at line 115 of file OneBalancedWordComputer.h.

◆ DSL

template<typename TConstIterator, typename TInteger>
typedef ArithmeticalDSL<TInteger, TInteger, 4> DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::DSL

Definition at line 118 of file OneBalancedWordComputer.h.

◆ FreemanChainCode

template<typename TConstIterator, typename TInteger>
typedef FreemanChain<TInteger> DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::FreemanChainCode

Definition at line 102 of file OneBalancedWordComputer.h.

◆ Index

template<typename TConstIterator, typename TInteger>
typedef int DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Index

Definition at line 112 of file OneBalancedWordComputer.h.

◆ Integer

template<typename TConstIterator, typename TInteger>
typedef TInteger DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Integer

Definition at line 99 of file OneBalancedWordComputer.h.

◆ Point

template<typename TConstIterator, typename TInteger>
typedef DGtal::PointVector<2,Integer> DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Point

Definition at line 107 of file OneBalancedWordComputer.h.

◆ Reverse

template<typename TConstIterator, typename TInteger>
typedef OneBalancedWordComputer<ConstIterator, Integer> DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Reverse

Definition at line 104 of file OneBalancedWordComputer.h.

◆ Self

template<typename TConstIterator, typename TInteger>
typedef OneBalancedWordComputer<ConstIterator, Integer> DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Self

Definition at line 103 of file OneBalancedWordComputer.h.

◆ Size

template<typename TConstIterator, typename TInteger>
typedef int DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Size

Definition at line 111 of file OneBalancedWordComputer.h.

◆ Vector

template<typename TConstIterator, typename TInteger>
typedef DGtal::PointVector<2,Integer> DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Vector

Definition at line 108 of file OneBalancedWordComputer.h.

Constructor & Destructor Documentation

◆ OneBalancedWordComputer() [1/2]

template<typename TConstIterator, typename TInteger>
DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::OneBalancedWordComputer ( )

◆ ~OneBalancedWordComputer()

template<typename TConstIterator, typename TInteger>
DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::~OneBalancedWordComputer ( )

Destructor.

◆ OneBalancedWordComputer() [2/2]

template<typename TConstIterator, typename TInteger>
DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::OneBalancedWordComputer ( const Self & other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

◆ back()

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::back ( ) const

Accessor to the first added point to the DSS

Returns
point.

◆ begin()

template<typename TConstIterator, typename TInteger>
ConstIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::begin ( ) const
Returns
begin iterator of the DSS range.

◆ BOOST_CONCEPT_ASSERT()

template<typename TConstIterator, typename TInteger>
DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::BOOST_CONCEPT_ASSERT ( (concepts::CInteger< TInteger >) )

◆ computeLeaningPoints()

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::computeLeaningPoints ( Point & uf,
Point & ul,
Point & lf,
Point & ll ) const

Computes the leaning points of the DSS

Parameters
ufthe (returned) first upper leaning point.
ulthe (returned) last upper leaning point.
lfthe (returned) first lower leaning point.
llthe (returned) last lower leaning point.

◆ defaultMoves()

template<typename TConstIterator, typename TInteger>
Vector DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::defaultMoves ( Code c)
inlinestatic

Default displacement vectors associated to codes.

Parameters
ceither 0, 1, 2, or 3
   (1)
    ^
    |
    |
(2) <-------> (0) | | v (3)

Definition at line 925 of file OneBalancedWordComputer.h.

926 {
927 Integer x = ( c == '0' ) ? 1 : ( ( c == '2' ) ? -1 : 0 ) ;
928 Integer y = ( c == '1' ) ? 1 : ( ( c == '3' ) ? -1 : 0 ) ;
929 return Vector( x, y );
930 }
DGtal::PointVector< 2, Integer > Vector

◆ displacement()

template<typename TConstIterator, typename TInteger>
Vector DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::displacement ( Code c) const

Convert a code into vector.

Parameters
ca code.
Returns
the vector defined by that code.

◆ end()

template<typename TConstIterator, typename TInteger>
ConstIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::end ( ) const
Returns
end iterator of the DSS range.

◆ extendBack()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::extendBack ( )

Tests whether the current DSS can be extended at the back. Computes the parameters of the extended DSS if yes.

Returns
'true' if yes, 'false' otherwise.

◆ extendFront()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::extendFront ( )

Tests whether the current DSS can be extended at the front. Computes the parameters of the extended DSS if yes.

Returns
'true' if yes, 'false' otherwise.

◆ front()

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::front ( ) const

Accessor to the last added point to the DSS

Returns
point.

◆ getA()

template<typename TConstIterator, typename TInteger>
Integer DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getA ( ) const

Computes the a-parameter of the bounding DSL. Uses 'getArithmeticalDescription' so prefer this latter one if more then one parameter is computed.

Returns
the value of 'a' in the DSS equation

◆ getArithmeticalDescription()

template<typename TConstIterator, typename TInteger>
DSL DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getArithmeticalDescription ( ) const

Computes the DSL of minimal parameters bounding the corresponding DSS,
ie. \( 0 \leq ax - by + \mu < \omega \)

Returns
the bounding DSL

◆ getB()

template<typename TConstIterator, typename TInteger>
Integer DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getB ( ) const

Computes the b-parameter of the bounding DSL. Uses 'getArithmeticalDescription' so prefer this latter one if more then one parameter is computed.

Returns
the value of 'b' in the DSS equation

◆ getBigLetter()

template<typename TConstIterator, typename TInteger>
Code DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getBigLetter ( ) const

Returns the last letter of the main pattern.

Returns
the big letter over which the DSS is written.

◆ getCode() [1/2]

template<typename TConstIterator, typename TInteger>
Code DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getCode ( Index pos)

Get the code at a given index, if code at index 'pos' has not been read yet, the input iterator will be used to access it.

Parameters
posa position in the FreemanChain
Returns
the letter at the given position

◆ getCode() [2/2]

template<typename TConstIterator, typename TInteger>
Code DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getCode ( Index pos) const

Get the code at a given index.

Parameters
posa position in the FreemanChain
Returns
the letter at the given position

◆ getMu()

template<typename TConstIterator, typename TInteger>
Integer DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getMu ( ) const

Computes the intercept of the bounding DSL. Uses 'getArithmeticalDescription' so prefer this latter one if more then one parameter is computed.

Returns
the value of 'mu' in the DSS equation

◆ getOmega()

template<typename TConstIterator, typename TInteger>
Integer DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getOmega ( ) const

Computes the thickness of the bounding DSL. Uses 'getArithmeticalDescription' so prefer this latter one if more then one parameter is computed.

Returns
the value of 'omega' in the DSS equation

◆ getReverse()

template<typename TConstIterator, typename TInteger>
Reverse DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getReverse ( ) const
Returns
a default-constructed instance of Reverse

◆ getSelf()

template<typename TConstIterator, typename TInteger>
Self DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getSelf ( ) const
Returns
an uninitialized instance of OneBalancedWordComputer.

◆ getSmallLetter()

template<typename TConstIterator, typename TInteger>
Code DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::getSmallLetter ( ) const

Returns the first letter of the main pattern.

Returns
the small letter over which the DSS is written.

◆ init() [1/4]

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::init ( const ConstIterator & it,
const Point & start = Point(0, 0),
Vector(* displacements )(Code) = defaultMoves )

Initialize from input iterator. A DSS of length 1 is initialize from the iterator.

By default, displacements are defined as : '0' -> (1,0), '1' -> (0,1), '2' -> (-1,0), '3' -> (0,-1)

Parameters
itthe first code to include in the DSS.
startthe position where the DSS starts.
displacementsthe function that defines displacement vectors from codes.

◆ init() [2/4]

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::init ( const ConstPointIterator & i)

Initialize from a ConstPointIterator on a OneBalancedWordComputer.

Parameters
iany iterator

◆ init() [3/4]

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::init ( const FreemanChainCode & fc)

Initialize from a Freman Chain code.

Note : to be used, this initialization method requires that the class is templated by string::const_iterator.

Parameters
fcFreemanChain on which is defined the DSS.

◆ init() [4/4]

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::init ( const typename FreemanChainCode::ConstIterator & it)

Initialize from a ConstIterator over a Freman Chain code.

Note : to be used, this initialization method requires that the class is templated by string::const_iterator.

Parameters
itConstIterator giving the letter to initialize the DSS with.

◆ isExtendableBack()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::isExtendableBack ( )

Tests whether the current DSS can be extended at the back.

Returns
'true' if yes, 'false' otherwise.

◆ isExtendableFront()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::isExtendableFront ( )

Tests whether the current DSS can be extended at the front.

Returns
'true' if yes, 'false' otherwise.

◆ isTrivial()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::isTrivial ( ) const

Test if the DSS is a trivial one, that is a DSS with slope 0 or infinite

Returns
'true' is the DSS is trivial, 'false' otherwise.

◆ isUL()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::isUL ( Index pos) const

Determines if a given position is a "upper leaning point". Note that it is assume that the orientation is such that the main pattern begins and ends on upper leaning points. NB: 'pos' must be between 'myPatternBegin' and 'myPatternEnd'

Parameters
posthe position of a letter in the main pattern of the DSS
Returns
'true' if this letter is an "upper leaning point" 'false' otherwise.

◆ isValid()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::isValid ( ) const

Performs some basic tests to check the validity of the DSS. For debugging purpose only.

Returns
'false' if the data is incoherent.

◆ Lf()

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Lf ( ) const

Accessor to the first lower leaning point Uses 'computeLeaningPoints' so prefer this latter one if more then one leaning point is computed.

Returns
first lower leaning point.

◆ Ll()

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Ll ( ) const

Accessor to the last lower leaning point Uses 'computeLeaningPoints' so prefer this latter one if more then one leaning point is computed.

Returns
last lower leaning point.

◆ longestChristoffelPrefix()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::longestChristoffelPrefix ( ConstIterator it,
const OrderedAlphabet & aOA )

Initializes the DSS with the longest Christoffel word that is read starting from a given position on a FreemanCode. Only Christoffel words written on a given pair of letters are considered. More precisely, if the ordered alphabet is [a0, a1, a2, a3] then the Christoffel word must be written on the letter a1 < a2.

Note that by usually Christoffel words are defined as primitive words while here repetitions of a Christoffel word will be included in the DSS.

Computation time is O(k) where k is the number of points included in the DSS.

Parameters
ita const iterator.
aOAthe ordered alphabet.
Returns
'true' if the FreemanChain is coding a path that is possibly digitally convex, 'false' if the path is not digitally convex.

◆ mainPatternLength()

template<typename TConstIterator, typename TInteger>
Size DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::mainPatternLength ( ) const

Computes the length of the main pattern.

Returns
the length of the main pattern

◆ mainPatternVector()

template<typename TConstIterator, typename TInteger>
Vector DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::mainPatternVector ( ) const

Computes the vector defined by the main pattern.

Returns
the vector defined by the main pattern.

◆ nextIsLL()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::nextIsLL ( Index pos) const

Determines if the letter at a given position leads a "lower leaning point". Note that it is assume that the orientation is such that the main pattern begins and ends on upper leaning points. NB: 'pos' must be between 'myPatternBegin' and 'myPatternEnd'

Parameters
posthe position of a letter in the main pattern of the DSS
Returns
'true' if this letter leads to a "lower leaning point" 'false' otherwise.

◆ operator!=()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::operator!= ( const Self & other) const

Difference operator.

Parameters
otherthe object to compare with.
Returns
'false' if equal 'true' otherwise

◆ operator=()

template<typename TConstIterator, typename TInteger>
OneBalancedWordComputer & DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::operator= ( const Self & other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ operator==()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::operator== ( const Self & other) const

Equality operator.

Parameters
otherthe object to compare with.

◆ pointBegin()

template<typename TConstIterator, typename TInteger>
ConstPointIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::pointBegin ( ) const

Accessor to the first added point to the DSS

Returns
point.

◆ pointEnd()

template<typename TConstIterator, typename TInteger>
ConstPointIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::pointEnd ( ) const

Accessor to the last added point to the DSS

Returns
point.

◆ prefixLength()

template<typename TConstIterator, typename TInteger>
Size DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::prefixLength ( ) const

Computes the length of the prefix of the main pattern read after it.

Returns
the length of the prefix read.

◆ previousIsLL()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::previousIsLL ( Index pos) const

Determines if the letter at a given position comes from a "lower leaning point". Note that it is assume that the orientation is such that the main pattern begins and ends on upper leaning points. NB: 'pos' must be between 'myPatternBegin' and 'myPatternEnd'

Parameters
posthe position of a letter in the main pattern of the DSS
Returns
'true' if this letter comes from a "lower leaning point" 'false' otherwise.

◆ remainder()

template<typename TConstIterator, typename TInteger>
Integer DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::remainder ( const Point & aPoint) const

Computes the remained of a point relatively to the arithmetical description of the current DSS.

Parameters
aPointa point whose remainder is returned
Returns
the remainder of aPoint

◆ retractBack()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::retractBack ( )

Removes the first point of the DSS (at back). NB : Unlike the ArithmeticalDSSComputer, a OneBalancedWordComputer must containt at least two points since it is defined by a letter in a Freeman Chain code.

Returns
'true' if the first point is removed, 'false' otherwise.

◆ retractFront()

template<typename TConstIterator, typename TInteger>
bool DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::retractFront ( )

Removes the last point of the DSS (at front). NB : Unlike the ArithmeticalDSSComputer, a OneBalancedWordComputer must containt at least two points since it is defined by a letter in a Freeman Chain code.

Returns
'true' if the last point is removed, 'false' otherwise.

◆ selfDisplay()

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::selfDisplay ( std::ostream & out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

◆ setPosition()

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::setPosition ( const Point & p)

Set the position of the first point of the DSS.

Parameters
pthe point where the DSS starts;

◆ suffixLength()

template<typename TConstIterator, typename TInteger>
Size DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::suffixLength ( ) const

Computes the length of the suffix of the main pattern read before it.

Returns
the length of the suffix read.

◆ translate()

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::translate ( const Vector & v)

Translates the DSS's position by a given vector.

Parameters
vthe translation vector.

◆ Uf()

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Uf ( ) const

Accessor to the first upper leaning point Uses 'computeLeaningPoints' so prefer this latter one if more then one leaning point is computed.

Returns
first upper leaning point.

◆ Ul()

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::Ul ( ) const

Accessor to the last upper leaning point Uses 'computeLeaningPoints' so prefer this latter one if more then one leaning point is computed.

Returns
last upper leaning point.

Field Documentation

◆ myBegin

template<typename TConstIterator, typename TInteger>
ConstIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myBegin
protected

Iterators on the input codes.

Definition at line 740 of file OneBalancedWordComputer.h.

◆ myCodeHandler

template<typename TConstIterator, typename TInteger>
CodeHandler<ConstIterator> DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myCodeHandler
protected

The array of char on which is defined the OneBalancedWordComputer

Definition at line 735 of file OneBalancedWordComputer.h.

◆ myDisplacements

template<typename TConstIterator, typename TInteger>
Vector(* DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myDisplacements) (Code)
protected

Function that converts the codes of a FreemanChain into a elementary translations.

Definition at line 789 of file OneBalancedWordComputer.h.

◆ myEnd

template<typename TConstIterator, typename TInteger>
ConstIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myEnd
protected

Definition at line 741 of file OneBalancedWordComputer.h.

◆ myFirstLetter

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myFirstLetter
protected

Index of the first letter of DSS in the FreemanChain

Definition at line 753 of file OneBalancedWordComputer.h.

◆ myFirstPoint

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myFirstPoint
protected

In order to keep track of the DSS position, first and last points are memorized.

Definition at line 747 of file OneBalancedWordComputer.h.

◆ myLastLetter

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myLastLetter
protected

Definition at line 754 of file OneBalancedWordComputer.h.

◆ myLastPoint

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myLastPoint
protected

Definition at line 748 of file OneBalancedWordComputer.h.

◆ myLeftPatternLength

template<typename TConstIterator, typename TInteger>
Size DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myLeftPatternLength
protected

The main pattern factorizes as two subpatterns: a left one and a right one.

Definition at line 775 of file OneBalancedWordComputer.h.

◆ myNbRepeat

template<typename TConstIterator, typename TInteger>
unsigned int DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myNbRepeat
protected

Number of repetitions of the central Christoffel word, otherwise said, the number of upper leaning points minus 1.

Definition at line 762 of file OneBalancedWordComputer.h.

◆ myNextAfter

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myNextAfter
protected

Definition at line 783 of file OneBalancedWordComputer.h.

◆ myNextBefore

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myNextBefore
protected

In order to add/remove letters efficiently from the prefix and the suffix of the main pattern being read, the position of the next letter to read is memorized.

Definition at line 782 of file OneBalancedWordComputer.h.

◆ myPatternBegin

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myPatternBegin
protected

Indexes indicates where, in the FreemanChain, is located the main pattern of this DSS.

Definition at line 768 of file OneBalancedWordComputer.h.

◆ myPatternEnd

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::myPatternEnd
protected

Definition at line 769 of file OneBalancedWordComputer.h.


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