DGtal  1.4.beta
Public Member Functions | Private Attributes
DGtal::concepts::CIncrementalSegmentComputer< T > Struct Template Reference

Aim: Defines the concept describing an incremental segment computer,
ie. a model of CSegmentFactory that can, in addition, incrementally check whether or not an implicit predicate P is true. In other words, it can control its own extension from a range of one element (in the direction that is relative to the underlying iterator) so that an implicit predicate P remains true.
More...

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

Inheritance diagram for DGtal::concepts::CIncrementalSegmentComputer< T >:
[legend]

Public Member Functions

 BOOST_CONCEPT_USAGE (CIncrementalSegmentComputer)
 
- Public Member Functions inherited from DGtal::concepts::CSegmentFactory< T >
 BOOST_STATIC_ASSERT ((boost::is_same< T, Self >::value))
 
 BOOST_CONCEPT_USAGE (CSegmentFactory)
 
- Public Member Functions inherited from DGtal::concepts::CSegment< T >
 BOOST_CONCEPT_USAGE (CSegment)
 

Private Attributes

myX
 
T::ConstIterator myI
 
bool myB
 

Additional Inherited Members

- Public Types inherited from DGtal::concepts::CSegmentFactory< T >
typedef T::Self Self
 
typedef T::Reverse Reverse
 
- Public Types inherited from DGtal::concepts::CSegment< T >
typedef T::ConstIterator ConstIterator
 

Detailed Description

template<typename T>
struct DGtal::concepts::CIncrementalSegmentComputer< T >

Aim: Defines the concept describing an incremental segment computer,
ie. a model of CSegmentFactory that can, in addition, incrementally check whether or not an implicit predicate P is true. In other words, it can control its own extension from a range of one element (in the direction that is relative to the underlying iterator) so that an implicit predicate P remains true.

Description of concept 'CIncrementalSegmentComputer'

Refinement of CSegmentFactory

Associated types

the same as CSegmentFactory

Notation

Definitions

Valid expressions and

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
Initialization x.init(i) void set a segment to i x is valid and P is true O(1)
Extension test x.isExtendableFront() bool x is valid and P is true check whether x can be extended to x.end() or not x is valid and P is true
Extension x.extendFront() bool x is valid and P is true check whether x can be extended to x.end() or not, extend only if true x is valid and P is true

Invariants

Models of CIncrementalSegmentComputer garantee that for each iterator it from s.begin() to s.end(), the range [s.begin(), it) is a segment such that P is true.

for ( ConstIterator it = s.begin(),
ConstIterator itEnd = s.end();
it != itEnd; ++it)
{
// [s.begin(), it) is a segment:
s.init( s.begin() );
bool flag = true;
while ( (s.end() != it)&&(flag) ) { flag = s.extend(); }
ASSERT( flag );
}

Models

Notes

Template Parameters
Tthe type that should be a model of CIncrementalSegmentComputer.

Definition at line 112 of file CIncrementalSegmentComputer.h.

Member Function Documentation

◆ BOOST_CONCEPT_USAGE()

template<typename T >
DGtal::concepts::CIncrementalSegmentComputer< T >::BOOST_CONCEPT_USAGE ( CIncrementalSegmentComputer< T >  )
inline

Field Documentation

◆ myB

template<typename T >
bool DGtal::concepts::CIncrementalSegmentComputer< T >::myB
private

◆ myI

template<typename T >
T::ConstIterator DGtal::concepts::CIncrementalSegmentComputer< T >::myI
private

◆ myX

template<typename T >
T DGtal::concepts::CIncrementalSegmentComputer< T >::myX
private

The documentation for this struct was generated from the following file:
DGtal::concepts::CIncrementalSegmentComputer::myB
bool myB
Definition: CIncrementalSegmentComputer.h:129
ConstIterator
MyDigitalSurface::ConstIterator ConstIterator
Definition: greedy-plane-segmentation-ex2.cpp:93
DGtal::concepts::CIncrementalSegmentComputer::myX
T myX
Definition: CIncrementalSegmentComputer.h:127
DGtal::concepts::ConceptUtils::sameType
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
DGtal::concepts::CSegment::it
ConstIterator it
Definition: CSegment.h:119
DGtal::concepts::CIncrementalSegmentComputer::myI
T::ConstIterator myI
Definition: CIncrementalSegmentComputer.h:128