DGtal
0.6.devel
|
#include <GreedyDecomposition.h>
Public Member Functions | |
SegmentIterator (const GreedyDecomposition< TSegment > *aDec, const typename TSegment::ConstIterator &aBack, const TSegment &aSegment) | |
SegmentIterator (const SegmentIterator &aOther) | |
SegmentIterator & | operator= (const SegmentIterator &aOther) |
~SegmentIterator () | |
Segment | operator* () const |
Segment | get () const |
SegmentIterator & | operator++ () |
void | next () |
bool | intersectNext () const |
bool | intersectPrevious () const |
const Iterator | getFront () const |
const Iterator | getBack () const |
bool | operator== (const SegmentIterator &aOther) const |
bool | operator!= (const SegmentIterator &aOther) const |
Private Member Functions | |
void | longestSegment () |
bool | doesIntersectNext (const Iterator &it) |
Private Attributes | |
const GreedyDecomposition < TSegment > * | myDec |
Iterator | myFront |
Iterator | myBack |
Segment | mySegment |
bool | myFlagIntersectNext |
bool | myFlagIntersectPrevious |
Friends | |
class | GreedyDecomposition< TSegment > |
This class is an iterator on a digital curve storing the current segment.
Definition at line 142 of file GreedyDecomposition.h.
|
inline |
Constructor. Nb: complexity in O(n).
aDec | a greedy decomposition of a digital curve |
aBack | an iterator at the back of the first segment |
Constructor. Nb: complexity in O(n).
anIterator | an iterator on the digital curve to decompose |
Definition at line 55 of file GreedyDecomposition.ih.
References DGtal::false, DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::longestSegment(), DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::myBack, DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::myDec, DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::myFlagIntersectPrevious, DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::myFront, and DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::mySegment.
|
inline |
Copy constructor.
other | the iterator to clone. |
Definition at line 100 of file GreedyDecomposition.ih.
|
inline |
Destructor. Does nothing.
Destructor. Does nothing
Definition at line 139 of file GreedyDecomposition.ih.
|
inlineprivate |
Checks if the current segment intersects the next one (if exists).
it | a given iterator |
Checks if the current segment intersects the next one (if exists).
Definition at line 213 of file GreedyDecomposition.ih.
References DGtal::deprecated::GreedyDecomposition< TSegment >::init().
|
inline |
Definition at line 164 of file GreedyDecomposition.ih.
References DGtal::deprecated::GreedyDecomposition< TSegment >::mySegment.
|
inline |
Definition at line 304 of file GreedyDecomposition.ih.
Referenced by DGtal::DSSLengthEstimator< TConstIterator >::init().
|
inline |
Definition at line 292 of file GreedyDecomposition.ih.
Referenced by DGtal::DSSLengthEstimator< TConstIterator >::init().
|
inline |
Definition at line 190 of file GreedyDecomposition.ih.
|
inline |
Definition at line 202 of file GreedyDecomposition.ih.
|
inlineprivate |
Computes the longest possible segment from two consecutive points. Nb: complexity in O(n).
Computes the longest possible segment from two consecutive points.
Definition at line 228 of file GreedyDecomposition.ih.
References DGtal::deprecated::GreedyDecomposition< TSegment >::mySegment.
Referenced by DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::SegmentIterator().
|
inline |
Goes to the next segment on the contour (if possible). Nb: complexity in O(n).
Goes to the next segment on a digital curve.
Definition at line 262 of file GreedyDecomposition.ih.
References DGtal::longestSegment().
|
inline |
Inequality operator.
aOther | the iterator to compare with |
Inequality operator.
aOther | the iterator to compare with |
Definition at line 337 of file GreedyDecomposition.ih.
References DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::myBack, and DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::myFront.
|
inline |
Definition at line 153 of file GreedyDecomposition.ih.
References DGtal::deprecated::GreedyDecomposition< TSegment >::mySegment.
|
inline |
Pre-increment. Goes to the next segment on the contour (if possible). Nb: complexity in O(n).
Pre-increment. Goes to the next segment on a digital curve.
Definition at line 177 of file GreedyDecomposition.ih.
|
inline |
Assignment.
aOther | the iterator to copy. |
Assignment.
other | the iterator to copy. |
Definition at line 119 of file GreedyDecomposition.ih.
References DGtal::deprecated::GreedyDecomposition< TSegment >::mySegment.
|
inline |
Equality operator.
aOther | the iterator to compare with |
Equality operator.
aOther | the iterator to compare with |
Definition at line 321 of file GreedyDecomposition.ih.
References DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::myBack, and DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::myFront.
|
friend |
Definition at line 191 of file GreedyDecomposition.h.
|
private |
An iterator of the contour at the back of the current segment
Definition at line 164 of file GreedyDecomposition.h.
Referenced by DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::operator!=(), DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::operator==(), and DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::SegmentIterator().
|
private |
Pointer to the decomposition
Definition at line 151 of file GreedyDecomposition.h.
Referenced by DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::SegmentIterator().
|
private |
A flag equal to TRUE if the current segment intersects the next one, FALSE otherwise (and FALSE if the current segment is the last one)
Definition at line 178 of file GreedyDecomposition.h.
|
private |
A flag equal to TRUE if the current segment intersects the previous one, FALSE otherwise (and FALSE if the current segment is the first one)
Definition at line 185 of file GreedyDecomposition.h.
Referenced by DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::SegmentIterator().
|
private |
An iterator of the digital curve at the front of the current segment
Definition at line 158 of file GreedyDecomposition.h.
Referenced by DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::operator!=(), DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::operator==(), and DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::SegmentIterator().
|
private |
The current segment
Definition at line 170 of file GreedyDecomposition.h.
Referenced by DGtal::deprecated::GreedyDecomposition< TSegment >::SegmentIterator::SegmentIterator().