53 template <
typename TSegment>
57 const typename TSegment::ConstIterator& aBack,
58 const TSegment& aSegment)
62 mySegment( aSegment ),
63 myFlagIntersectNext(
false),
64 myFlagIntersectPrevious(
false)
75 if (
myDec->isClosed) {
78 Segment tmpSegment; tmpSegment.init(tmpIt);
97 template <
typename TSegment>
101 : myDec( aOther.
myDec ),
115 template <
typename TSegment>
121 if (
this != &other )
124 myFront = other.myFront;
125 myBack = other.myBack;
127 myFlagIntersectNext = other.myFlagIntersectNext;
128 myFlagIntersectPrevious = other.myFlagIntersectPrevious;
137 template <
typename TSegment>
150 template <
typename TSegment>
161 template <
typename TSegment>
174 template <
typename TSegment>
187 template <
typename TSegment>
192 return myFlagIntersectNext;
199 template <
typename TSegment>
204 return myFlagIntersectPrevious;
210 template <
typename TSegment>
216 Iterator previousIt = it; --previousIt;
217 tmpSegment.
init(previousIt);
218 return tmpSegment.extendForward(it);
225 template <
typename TSegment>
234 while ( (myFront != myDec->myEnd) &&
240 if (myFront == myDec->myEnd) {
243 if (myDec->isClosed) {
244 myFlagIntersectNext =
mySegment.extendForward(myDec->myBegin);
246 myFlagIntersectNext =
false;
250 myFlagIntersectNext = doesIntersectNext(myFront);
259 template <
typename TSegment>
265 if (myFront != myDec->myEnd) {
269 myFlagIntersectPrevious = myFlagIntersectNext;
271 if (myFlagIntersectPrevious) {
280 myBack = myDec->myEnd;
289 template <
typename TSegment>
291 const typename TSegment::ConstIterator
301 template <
typename TSegment>
303 const typename TSegment::ConstIterator
317 template <
typename TSegment>
320 DGtal::deprecated::GreedyDecomposition<TSegment>::SegmentIterator::operator==
323 return ( (myFront == aOther.
myFront)&&(myBack == aOther.
myBack) );
333 template <
typename TSegment>
336 DGtal::deprecated::GreedyDecomposition<TSegment>::SegmentIterator::operator!=
339 return ( (myFront != aOther.
myFront)||(myBack != aOther.
myBack) );
356 template <
typename TSegment>
371 template <
typename TSegment>
386 template <
typename TSegment>
397 template <
typename TSegment>
410 template <
typename TSegment>
423 template <
typename TSegment>
428 out <<
"[GreedyDecomposition]";
435 template <
typename TSegment>
448 template <
typename TSegment>
454 object.selfDisplay( out );