36 #if defined(OneBalancedWordComputer_RECURSES)
37 #error Recursive header files inclusion detected in OneBalancedWordComputer.h
38 #else // defined(OneBalancedWordComputer_RECURSES)
40 #define OneBalancedWordComputer_RECURSES
42 #if !defined OneBalancedWordComputer_h
44 #define OneBalancedWordComputer_h
49 #include "DGtal/base/Common.h"
50 #include "DGtal/geometry/curves/FreemanChain.h"
51 #include "DGtal/base/OrderedAlphabet.h"
52 #include "DGtal/base/IteratorCirculatorTraits.h"
53 #include "DGtal/kernel/CInteger.h"
54 #include "DGtal/arithmetic/IntegerComputer.h"
55 #include "DGtal/geometry/curves/ArithmeticalDSL.h"
90 template <
typename TConstIterator,
typename TInteger>
128 template < class TIterator, class iterator_type = typename IteratorCirculatorTraits <TIterator>::Category >
class CodeHandler
133 void init(
const TIterator & it )
162 template <
class TIterator >
169 void init(
const TIterator & it )
177 return ( n >= 0 ) ? myPosCodes[ n ] : myNegCodes[ 1-n ];
185 unsigned int i = 1-n;
186 while ( i >= myNegCodes.size() )
189 myNegCodes.push_back( *myFirst );
196 while ( i >= myPosCodes.size() )
198 myPosCodes.push_back( *myLast );
216 template <
class TIterator>
223 void init (
const TIterator & it )
927 Integer x = ( c ==
'0' ) ? 1 : ( ( c ==
'2' ) ? -1 : 0 ) ;
928 Integer y = ( c ==
'1' ) ? 1 : ( ( c ==
'3' ) ? -1 : 0 ) ;
942 template <
typename TConstIterator,
typename TInteger >
953 #include "DGtal/geometry/curves/OneBalancedWordComputer.ih"
957 #endif // !defined OneBalancedWordComputer_h
959 #undef OneBalancedWordComputer_RECURSES
960 #endif // else defined(OneBalancedWordComputer_RECURSES)
Index operator-(const ConstPointIterator other) const
Code getBigLetter() const
Code getCode(Index n) const
bool nextIsLL(Index pos) const
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
DGtal::PointVector< 2, Integer > Vector
Vector mainPatternVector() const
ConstPointIterator(const OneBalancedWordComputer *dss, Index ind, Point pt)
bool previousIsLL(Index pos) const
static Vector defaultMoves(Code c)
Code getCode(Index n) const
ConstPointIterator operator--(int)
ConstPointIterator & operator--()
bool operator==(const Self &other) const
FreemanChain< TInteger > FreemanChainCode
ConstPointIterator pointBegin() const
const OneBalancedWordComputer * myDSS
bool isUL(Index pos) const
bool operator!=(const Self &other) const
void init(const TIterator &it)
ConstPointIterator(const ConstPointIterator &other)=default
OneBalancedWordComputer(const Self &other)
Size suffixLength() const
std::vector< Code > myCodes
OneBalancedWordComputer()
bool longestChristoffelPrefix(ConstIterator it, const OrderedAlphabet &aOA)
void setPosition(const Point &p)
OneBalancedWordComputer & operator=(const Self &other)
ConstPointIterator & operator++()
DGtal is the top-level namespace which contains all DGtal functions and types.
ConstPointIterator pointEnd() const
ConstIterator begin() const
bool operator==(const ConstPointIterator other) const
BidirectionalCategory iterator_category
TConstIterator ConstIterator
CodeHandler< ConstIterator > myCodeHandler
ConstIterator end() const
const OneBalancedWordComputer * getDSS() const
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
Code getCode(Index n) const
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Vector(* myDisplacements)(Code)
Aim: This class represents a naive (resp. standard) digital straight line (DSL), ie....
ConstPointIterator operator++(int)
Reverse getReverse() const
void init(const ConstPointIterator &i)
void selfDisplay(std::ostream &out) const
Aim: Describes an alphabet over an interval of (ascii) letters, where the lexicographic order can be ...
Integer remainder(const Point &aPoint) const
Size prefixLength() const
Vector(* DisplacementFct)(Code)
ArithmeticalDSL< TInteger, TInteger, 4 > DSL
void init(const typename FreemanChainCode::ConstIterator &it)
ConstPointIterator & operator=(const ConstPointIterator &other)
std::vector< Code > myNegCodes
DGtal::PointVector< 2, Integer > Point
void init(const ConstIterator &it, const Point &start=Point(0, 0), Vector(*displacements)(Code)=defaultMoves)
OneBalancedWordComputer< ConstIterator, Integer > Reverse
~OneBalancedWordComputer()
void init(const FreemanChainCode &fc)
void init(const TIterator &it)
void computeLeaningPoints(Point &uf, Point &ul, Point &lf, Point &ll) const
void translate(const Vector &v)
std::vector< Code > myPosCodes
OneBalancedWordComputer< ConstIterator, Integer > Self
Size mainPatternLength() const
Code getCode(Index pos) const
bool operator!=(const ConstPointIterator other) const
Code getSmallLetter() const
Vector displacement(Code c) const
void init(const TIterator &it)
IteratorCirculatorTraits< ConstIterator >::Value Code
DSL getArithmeticalDescription() const