DGtal  1.5.beta
DGtal::concepts::CSegment< T > Struct Template Reference

Aim: Defines the concept describing a segment, ie. a valid and not empty range. More...

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

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

Public Types

typedef T::ConstIterator ConstIterator
 

Public Member Functions

 BOOST_CONCEPT_USAGE (CSegment)
 

Private Attributes

myX
 
ConstIterator it
 

Detailed Description

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

Aim: Defines the concept describing a segment, ie. a valid and not empty range.

Description of concept 'CSegment'

Refinement of boost::DefaultConstructible<T>, boost::CopyConstructible<T>, boost::Assignable<T>, boost::EqualityComparable<T>

Associated types

  • ConstIterator, the type used to iterate over the elements of the segment, a model of bidirectional iterator

Notation

  • X : A type that is a model of CSegment
  • x, y : object of type X

Valid expressions and semantics

Name Expression Type requirements Return type Precondition Semantics Post condition Complexity
begin method x.begin() ConstIterator provides an iterator on the first element of the segment O(1)
end method x.end() ConstIterator past-the-end value O(1)

Invariants

The range [x.begin(),x.end()) is valid (x.end() is reachable from x.begin()) and not empty (x.begin() != x.end()).

Models

Notes

A class of segments \( \Sigma_P \) is a set of segments such that for each segment of the set, a given predicate \( P \) is true: \( \forall s \in \Sigma_P, P(s) = \textrm{true} \).

Segment computers, which refines CSegment, are segment that can control their own extension so that a given predicate remains true.

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

Definition at line 101 of file CSegment.h.

Member Typedef Documentation

◆ ConstIterator

template<typename T >
typedef T::ConstIterator DGtal::concepts::CSegment< T >::ConstIterator

Definition at line 106 of file CSegment.h.

Member Function Documentation

◆ BOOST_CONCEPT_USAGE()

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

Field Documentation

◆ it

template<typename T >
ConstIterator DGtal::concepts::CSegment< T >::it
private

Definition at line 119 of file CSegment.h.

Referenced by DGtal::concepts::CSegment< T >::BOOST_CONCEPT_USAGE().

◆ myX

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

Definition at line 118 of file CSegment.h.

Referenced by DGtal::concepts::CSegment< T >::BOOST_CONCEPT_USAGE().


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