DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Private Attributes
DGtal::HyperRectDomain< TSpace >::ConstSubRange Struct Reference

#include <HyperRectDomain.h>

Collaboration diagram for DGtal::HyperRectDomain< TSpace >::ConstSubRange:
Collaboration graph
[legend]

Public Types

typedef
HyperRectDomain_subIterator
< Point
ConstIterator
typedef myreverse_iterator
< ConstIterator
ConstReverseIterator

Public Member Functions

 ConstSubRange (const HyperRectDomain< TSpace > &domain, const std::vector< Dimension > &permutation, const Point &startingPoint)
 ConstSubRange (const HyperRectDomain< TSpace > &domain, Dimension adim, const Point &startingPoint)
 ConstSubRange (const HyperRectDomain< TSpace > &domain, Dimension adim1, Dimension adim2, const Point &startingPoint)
 ConstSubRange (const HyperRectDomain< TSpace > &domain, Dimension adim1, Dimension adim2, Dimension adim3, const Point &startingPoint)
ConstIterator begin () const
ConstIterator begin (const Point &aPoint) const
ConstIterator end () const
ConstReverseIterator rbegin () const
ConstReverseIterator rbegin (const Point &aPoint) const
ConstReverseIterator rend () const

Private Attributes

Point myLowerBound
Point myUpperBound
Point myStartingPoint
std::vector< DimensionmyPermutation

Detailed Description

template<typename TSpace>
struct DGtal::HyperRectDomain< TSpace >::ConstSubRange

Aim: range through some subdomain of all the points in the domain. Defines a constructor taking a domain in parameter plus some additional parameters to specify the subdomain, begin and end methods returning ConstIterator, and rbegin and rend methods returning ConstReverseIterator.

Description of class 'ConstSubRange'

Definition at line 216 of file HyperRectDomain.h.


Member Typedef Documentation

Definition at line 218 of file HyperRectDomain.h.

Definition at line 219 of file HyperRectDomain.h.


Constructor & Destructor Documentation

template<typename TSpace>
DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange ( const HyperRectDomain< TSpace > &  domain,
const std::vector< Dimension > &  permutation,
const Point startingPoint 
)
inline

ConstSubRange constructor from a given domain.

Parameters:
domainthe domain.
permutationa vector containing the dimensions used for the subrange. Dimensions are iterated in the given order.
startingPointthe initial point.
Precondition:
startingPoint must belong to the range.

Definition at line 229 of file HyperRectDomain.h.

References DGtal::HyperRectDomain< TSpace >::ConstSubRange::myLowerBound, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myPermutation, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myStartingPoint, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myUpperBound, and DGtal::PointVector< dim, TEuclideanRing >::partialCopyInv().

myStartingPoint(startingPoint)
{
myPermutation.reserve( permutation.size() );
std::copy(permutation.begin(),permutation.end(),
std::back_inserter(myPermutation));
}
template<typename TSpace>
DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange ( const HyperRectDomain< TSpace > &  domain,
Dimension  adim,
const Point startingPoint 
)
inline
template<typename TSpace>
DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange ( const HyperRectDomain< TSpace > &  domain,
Dimension  adim1,
Dimension  adim2,
const Point startingPoint 
)
inline

ConstSubRange constructor from a given domain for two dimensions.

Parameters:
domainthe domain.
adim1the first dimension used for the subrange.
adim2the second dimension used for the subrange.
startingPointthe initial point.
Precondition:
startingPoint must belong to the range.

Definition at line 297 of file HyperRectDomain.h.

References DGtal::HyperRectDomain< TSpace >::ConstSubRange::myLowerBound, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myPermutation, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myStartingPoint, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myUpperBound, and DGtal::PointVector< dim, TEuclideanRing >::partialCopyInv().

template<typename TSpace>
DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange ( const HyperRectDomain< TSpace > &  domain,
Dimension  adim1,
Dimension  adim2,
Dimension  adim3,
const Point startingPoint 
)
inline

ConstSubRange constructor from a given domain for two dimensions.

Parameters:
domainthe domain.
adim1the first dimension used for the subrange.
adim2the second dimension used for the subrange.
adim3the third dimension used for the subrange.
startingPointthe initial point.
Precondition:
startingPoint must belong to the range.

Definition at line 319 of file HyperRectDomain.h.

References DGtal::HyperRectDomain< TSpace >::ConstSubRange::myLowerBound, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myPermutation, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myStartingPoint, DGtal::HyperRectDomain< TSpace >::ConstSubRange::myUpperBound, and DGtal::PointVector< dim, TEuclideanRing >::partialCopyInv().


Member Function Documentation

template<typename TSpace>
ConstIterator DGtal::HyperRectDomain< TSpace >::ConstSubRange::begin ( ) const
inline
template<typename TSpace>
ConstIterator DGtal::HyperRectDomain< TSpace >::ConstSubRange::begin ( const Point aPoint) const
inline
template<typename TSpace>
ConstIterator DGtal::HyperRectDomain< TSpace >::ConstSubRange::end ( ) const
inline
template<typename TSpace>
ConstReverseIterator DGtal::HyperRectDomain< TSpace >::ConstSubRange::rbegin ( ) const
inline
template<typename TSpace>
ConstReverseIterator DGtal::HyperRectDomain< TSpace >::ConstSubRange::rbegin ( const Point aPoint) const
inline

Definition at line 380 of file HyperRectDomain.h.

References DGtal::HyperRectDomain< TSpace >::ConstSubRange::begin().

{ ConstIterator it(begin(aPoint)); ++it;
return ConstReverseIterator(it); }
template<typename TSpace>
ConstReverseIterator DGtal::HyperRectDomain< TSpace >::ConstSubRange::rend ( ) const
inline

Field Documentation

template<typename TSpace>
Point DGtal::HyperRectDomain< TSpace >::ConstSubRange::myLowerBound
private
template<typename TSpace>
std::vector<Dimension> DGtal::HyperRectDomain< TSpace >::ConstSubRange::myPermutation
private
template<typename TSpace>
Point DGtal::HyperRectDomain< TSpace >::ConstSubRange::myStartingPoint
private

Starting point of the subrange.

Definition at line 397 of file HyperRectDomain.h.

Referenced by DGtal::HyperRectDomain< TSpace >::ConstSubRange::ConstSubRange().

template<typename TSpace>
Point DGtal::HyperRectDomain< TSpace >::ConstSubRange::myUpperBound
private

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