File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator Struct Reference

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

Public Types

typedef BidirectionalCategory iterator_category
typedef Point value_type
typedef Index difference_type
typedef Pointpointer
typedef Pointreference

Public Member Functions

 ConstPointIterator ()
 ConstPointIterator (const OneBalancedWordComputer *dss, Index ind, Point pt)
 ~ConstPointIterator ()
bool operator== (const ConstPointIterator other) const
bool operator!= (const ConstPointIterator other) const
Index operator- (const ConstPointIterator other) const
 ConstPointIterator (const ConstPointIterator &other)=default
ConstPointIteratoroperator= (const ConstPointIterator &other)
Point operator* () const
ConstPointIteratoroperator++ ()
ConstPointIterator operator++ (int)
ConstPointIteratoroperator-- ()
ConstPointIterator operator-- (int)
void next ()
void prev ()
const OneBalancedWordComputergetDSS () const
Index getIndex () const

Data Fields

const OneBalancedWordComputermyDSS
Index i
Point p

Detailed Description

template<typename TConstIterator, typename TInteger>
struct DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator

Iterator on the points of the DSS

Definition at line 248 of file OneBalancedWordComputer.h.

Member Typedef Documentation

◆ difference_type

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

Definition at line 253 of file OneBalancedWordComputer.h.

◆ iterator_category

template<typename TConstIterator, typename TInteger>
typedef BidirectionalCategory DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::iterator_category

Definition at line 251 of file OneBalancedWordComputer.h.

◆ pointer

template<typename TConstIterator, typename TInteger>
typedef Point* DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::pointer

Definition at line 254 of file OneBalancedWordComputer.h.

◆ reference

template<typename TConstIterator, typename TInteger>
typedef Point& DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::reference

Definition at line 255 of file OneBalancedWordComputer.h.

◆ value_type

template<typename TConstIterator, typename TInteger>
typedef Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::value_type

Definition at line 252 of file OneBalancedWordComputer.h.

Constructor & Destructor Documentation

◆ ConstPointIterator() [1/3]

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

Default constructor, does nothing

Definition at line 264 of file OneBalancedWordComputer.h.

265 {}

Referenced by ConstPointIterator(), operator!=(), operator++(), operator++(), operator-(), operator--(), operator--(), operator=(), and operator==().

◆ ConstPointIterator() [2/3]

template<typename TConstIterator, typename TInteger>
DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::ConstPointIterator ( const OneBalancedWordComputer * dss,
Index ind,
Point pt )
inline

Initialization constructor.

Parameters
dssOneBalancedWordComputer on which the iterator is defined.
indIndex of the first letter.
ptstarting point of the iterator.

Definition at line 273 of file OneBalancedWordComputer.h.

References i, myDSS, DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::OneBalancedWordComputer(), and p.

◆ ~ConstPointIterator()

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

Destructor. Does nothing.

Definition at line 280 of file OneBalancedWordComputer.h.

280{}

◆ ConstPointIterator() [3/3]

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

Default copy constructor.

Parameters
otherthe object to copy.

References ConstPointIterator().

Member Function Documentation

◆ getDSS()

template<typename TConstIterator, typename TInteger>
const OneBalancedWordComputer * DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::getDSS ( ) const
inline

◆ getIndex()

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::getIndex ( ) const
inline

Definition at line 376 of file OneBalancedWordComputer.h.

377 {
378 return i;
379 }

References i.

◆ next()

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::next ( )
inline

Definition at line 354 of file OneBalancedWordComputer.h.

355 {
356 p += myDSS->myDisplacements( myDSS->getCode( i ) );
357 ++i;
358 }

References i, myDSS, and p.

Referenced by operator++(), and operator++().

◆ operator!=()

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

Definition at line 289 of file OneBalancedWordComputer.h.

290 {
291 return i != other.i;
292 }

References ConstPointIterator(), and i.

◆ operator*()

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::operator* ( ) const
inline

Definition at line 317 of file OneBalancedWordComputer.h.

318 {
319 return p;
320 }

References p.

◆ operator++() [1/2]

template<typename TConstIterator, typename TInteger>
ConstPointIterator & DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::operator++ ( )
inline

Definition at line 323 of file OneBalancedWordComputer.h.

324 {
325 next();
326 return *this;
327 }

References ConstPointIterator(), and next().

◆ operator++() [2/2]

template<typename TConstIterator, typename TInteger>
ConstPointIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::operator++ ( int )
inline

Definition at line 330 of file OneBalancedWordComputer.h.

References ConstPointIterator(), and next().

◆ operator-()

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::operator- ( const ConstPointIterator other) const
inline

Definition at line 294 of file OneBalancedWordComputer.h.

295 {
296 return i - other.i;
297 }

References ConstPointIterator(), and i.

◆ operator--() [1/2]

template<typename TConstIterator, typename TInteger>
ConstPointIterator & DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::operator-- ( )
inline

Definition at line 339 of file OneBalancedWordComputer.h.

340 {
341 prev();
342 return *this;
343 }

References ConstPointIterator(), and prev().

◆ operator--() [2/2]

template<typename TConstIterator, typename TInteger>
ConstPointIterator DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::operator-- ( int )
inline

Definition at line 346 of file OneBalancedWordComputer.h.

347 {
348 ConstPointIterator it = *this;
349 prev();
350 return it;
351 }

References ConstPointIterator(), and prev().

◆ operator=()

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

Assignment operator.

Parameters
otherthe object to copy.

Definition at line 309 of file OneBalancedWordComputer.h.

310 {
311 i = other.i;
312 myDSS = other.myDSS;
313 p = other.p;
314 return *this;
315 }

References ConstPointIterator(), i, myDSS, and p.

◆ operator==()

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

Comparaison operators.

Definition at line 285 of file OneBalancedWordComputer.h.

286 {
287 return i == other.i;
288 }

References ConstPointIterator(), and i.

◆ prev()

template<typename TConstIterator, typename TInteger>
void DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::prev ( )
inline

Definition at line 361 of file OneBalancedWordComputer.h.

362 {
363 --i;
364 p -= myDSS->myDisplacements( myDSS->getCode( i ) );
365 }

References i, myDSS, and p.

Referenced by operator--(), and operator--().

Field Documentation

◆ i

template<typename TConstIterator, typename TInteger>
Index DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::i

◆ myDSS

template<typename TConstIterator, typename TInteger>
const OneBalancedWordComputer* DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::myDSS

Definition at line 257 of file OneBalancedWordComputer.h.

Referenced by ConstPointIterator(), getDSS(), next(), operator=(), and prev().

◆ p

template<typename TConstIterator, typename TInteger>
Point DGtal::OneBalancedWordComputer< TConstIterator, TInteger >::ConstPointIterator::p

Definition at line 259 of file OneBalancedWordComputer.h.

Referenced by ConstPointIterator(), next(), operator*(), operator=(), and prev().


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