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

Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digital space. More...

#include <DGtal/kernel/domains/CDomain.h>

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

Public Types

typedef T::Domain Domain
 
typedef T::Space Space
 
typedef T::Point Point
 
typedef T::Vector Vector
 
typedef T::Integer Integer
 
typedef T::Size Size
 
typedef T::Dimension Dimension
 
typedef T::Predicate Predicate
 
typedef T::ConstIterator ConstIterator
 
- Public Types inherited from DGtal::concepts::CConstSinglePassRange< T >
typedef T::ConstIterator ConstIterator
 

Public Member Functions

 BOOST_CONCEPT_USAGE (CDomain)
 
- Public Member Functions inherited from DGtal::concepts::CConstSinglePassRange< T >
 BOOST_CONCEPT_ASSERT ((boost_concepts::SinglePassIteratorConcept< ConstIterator >))
 
 BOOST_CONCEPT_USAGE (CConstSinglePassRange)
 
void checkConstConstraints () const
 

Private Attributes

myT
 
Point myP
 
Predicate myPred
 
bool myBool
 
Size mySize
 
ConstIterator myIt
 

Detailed Description

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

Aim: This concept represents a digital domain, i.e. a non mutable subset of points of the given digital space.

DescriptionDescription of concept 'CDomain'

Refinement of CConstSinglePassRange

Associated types

  • Domain : the type itself of the CDomain model.
  • Space : the embedding digital space.
  • Point : the point type of the space
  • Size : the type used for counting elements of the space.
  • Dimension : the type used for indexing the dimension.
  • Vector : the vector type of the space
  • Predicate : the type of the predicate returning true for exactly the points of this domain.

Notation

Definitions

Valid expressions and

Name Expression Type requirements Return type Precondition Semantics Postcondition Complexity
lower bound x.lowerBound() const Point & return the infimum of all points of the domain. O(1)
upper bound x.upperBound() const Point & return the supremum of all points of the domain. O(1)
inside domain test x.isInside( p ) bool return 'true' whenever p is in the domain.
inside domain predicate object x.predicate() const Predicate & return a reference to the predicate object equivalent to the isInside(p) test.
size x.size() Size return the number of points lying in the domain. O(1)
iterator from point x.begin(p) ConstIterator return a ConstIterator on the domain starting from the point p.

Invariants#

Models# HyperRectDomain, DigitalSetDomain

Notes#

Todo:
Complete domain checking.
Examples
dec/exampleDECSurface.cpp.

Definition at line 129 of file CDomain.h.

Member Typedef Documentation

◆ ConstIterator

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

Definition at line 141 of file CDomain.h.

◆ Dimension

template<typename T >
typedef T::Dimension DGtal::concepts::CDomain< T >::Dimension

Definition at line 139 of file CDomain.h.

◆ Domain

template<typename T >
typedef T::Domain DGtal::concepts::CDomain< T >::Domain

Definition at line 133 of file CDomain.h.

◆ Integer

template<typename T >
typedef T::Integer DGtal::concepts::CDomain< T >::Integer

Definition at line 137 of file CDomain.h.

◆ Point

template<typename T >
typedef T::Point DGtal::concepts::CDomain< T >::Point

Definition at line 135 of file CDomain.h.

◆ Predicate

template<typename T >
typedef T::Predicate DGtal::concepts::CDomain< T >::Predicate

Definition at line 140 of file CDomain.h.

◆ Size

template<typename T >
typedef T::Size DGtal::concepts::CDomain< T >::Size

Definition at line 138 of file CDomain.h.

◆ Space

template<typename T >
typedef T::Space DGtal::concepts::CDomain< T >::Space

Definition at line 134 of file CDomain.h.

◆ Vector

template<typename T >
typedef T::Vector DGtal::concepts::CDomain< T >::Vector

Definition at line 136 of file CDomain.h.

Member Function Documentation

◆ BOOST_CONCEPT_USAGE()

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

Definition at line 143 of file CDomain.h.

144  {
145  // Domain should have a lowerBound() returning a Point.
146  ConceptUtils::sameType( myP, myT.lowerBound() );
147  // Domain should have an upperBound() returning a Point.
148  ConceptUtils::sameType( myP, myT.upperBound() );
149  // Domain should have a size() returning a Size.
150  ConceptUtils::sameType( mySize, myT.size() );
151  // Domain should have a isInside(p) returning a bool.
152  ConceptUtils::sameType( myBool, myT.isInside( myP ) );
153  // Domain should have a predicate() returning a Predicate.
154  ConceptUtils::sameType( myPred, myT.predicate() );
155  // Domain should have a begin(Point) method returning an
156  // ConstIterator starting from Point
157  ConceptUtils::sameType( myIt, myT.begin(myP) );
158 
159 
160  }
void sameType(const T &, const T &)
Definition: ConceptUtils.h:117
ConstIterator myIt
Definition: CDomain.h:169

References DGtal::concepts::CDomain< T >::myBool, DGtal::concepts::CDomain< T >::myIt, DGtal::concepts::CDomain< T >::myP, DGtal::concepts::CDomain< T >::myPred, DGtal::concepts::CDomain< T >::mySize, DGtal::concepts::CDomain< T >::myT, and DGtal::concepts::ConceptUtils::sameType().

Field Documentation

◆ myBool

template<typename T >
bool DGtal::concepts::CDomain< T >::myBool
private

Definition at line 167 of file CDomain.h.

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

◆ myIt

template<typename T >
ConstIterator DGtal::concepts::CDomain< T >::myIt
private

Definition at line 169 of file CDomain.h.

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

◆ myP

template<typename T >
Point DGtal::concepts::CDomain< T >::myP
private

Definition at line 165 of file CDomain.h.

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

◆ myPred

template<typename T >
Predicate DGtal::concepts::CDomain< T >::myPred
private

Definition at line 166 of file CDomain.h.

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

◆ mySize

template<typename T >
Size DGtal::concepts::CDomain< T >::mySize
private

Definition at line 168 of file CDomain.h.

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

◆ myT

template<typename T >
T DGtal::concepts::CDomain< T >::myT
private

Definition at line 164 of file CDomain.h.

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


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