32 #if defined(HyperRectDomain_RECURSES)
33 #error Recursive header files inclusion detected in HyperRectDomain.h
36 #define HyperRectDomain_RECURSES
38 #if !defined HyperRectDomain_h
40 #define HyperRectDomain_h
47 #include "DGtal/base/Common.h"
48 #include "DGtal/kernel/CSpace.h"
49 #include "DGtal/kernel/BasicPointPredicates.h"
50 #include "DGtal/kernel/domains/CDomain.h"
51 #include "DGtal/kernel/domains/HyperRectDomain_Iterator.h"
52 #include "DGtal/kernel/NumberTraits.h"
53 #include "DGtal/base/CConstBidirectionalRange.h"
98 template<
typename TSpace>
191 "The point must be inside the domain or be equal to one of his bound."
225 "The point must be inside the domain or be equal to one of his bound."
263 const std::vector<Dimension> & permutation,
264 const Point & startingPoint)
271 "The point must be inside the given domain or be equal to one of his bound."
275 std::copy(permutation.begin(), permutation.end(), std::back_inserter(
myPermutation));
289 std::initializer_list<Dimension> permutation,
290 const Point & startingPoint)
297 "The point must be inside the given domain or be equal to one of his bound."
301 for (
const unsigned int *c = permutation.begin(); c != permutation.end(); ++c )
318 const Point & startingPoint)
325 "The point must be inside the given domain or be equal to one of his bound."
343 const Point & startingPoint)
350 "The point must be inside the given domain or be equal to one of his bound."
370 const Point & startingPoint)
377 "The point must be inside the given domain or be equal to one of his bound."
407 "The point must be inside the given domain or be equal to one of his bound."
486 const Point & startingPoint)
const
499 const Point & startingPoint)
const
513 const Point & startingPoint)
const
528 const Point & startingPoint)
const
530 return ConstSubRange(*
this, adim1, adim2, adim3, startingPoint);
553 const Point & startingPoint)
568 for(
Dimension i=0; i < Space::dimension; ++i)
664 template<
typename TSpace>
674 #include "DGtal/kernel/domains/HyperRectDomain.ih"
681 #undef HyperRectDomain_RECURSES
Iterator for HyperRectDomain.
Reverse iterator for HyperRectDomain.
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Point myUpperBound
The highest point of the space diagonal.
Point myLowerBound
The lowest point of the space diagonal.
HyperRectDomain(const typename Space::RealPoint &lowerPoint, const typename Space::RealPoint &upperPoint)
HyperRectDomain< Space > Domain
BOOST_STATIC_CONSTANT(Dimension, dimension=Space::dimension)
ConstSubRange subRange(Dimension adim1, Dimension adim2, Dimension adim3, const Point &startingPoint) const
bool isInside(const Point &p) const
ConstSubRange subRange(const std::vector< Dimension > &permutation, const Point &startingPoint) const
functors::IsWithinPointPredicate< Point > Predicate
const ConstIterator & end() const
const ConstIterator & begin() const
ReverseIterator ConstReverseIterator
ConstSubRange subRange(std::initializer_list< Dimension > permutation)
const Point & lowerBound() const
ConstReverseIterator rbegin() const
ConstIterator myIteratorBegin
Begin iterator.
const Predicate & predicate() const
ConstSubRange subRange(Dimension adim, const Point &startingPoint) const
HyperRectDomain(const Point &lowerPoint, const Point &upperPoint)
const Point & upperBound() const
ConstSubRange subRange(const std::vector< Dimension > &permutation) const
HyperRectDomain & operator=(const HyperRectDomain &other)
HyperRectDomain_ReverseIterator< Iterator > ReverseIterator
void selfDisplay(std::ostream &out) const
ConstIterator begin(const Point &aPoint) const
ConstReverseIterator rend() const
Predicate myPredicate
"IsInside" predicate.
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
std::string className() const
HyperRectDomain_Iterator< Point > Iterator
Typedef of domain iterators.
HyperRectDomain(const HyperRectDomain &other)
Point::Coordinate Coordinate
ConstSubRange subRange(std::initializer_list< Dimension > permutation, const Point &startingPoint)
Space::Dimension Dimension
ConstReverseIterator rbegin(const Point &aPoint) const
HyperRectDomain< TSpace > Self
ConstSubRange subRange(Dimension adim1, Dimension adim2, const Point &startingPoint) const
ConstIterator myIteratorEnd
End iterator.
bool isLower(const PointVector< dim, OtherComponent, OtherStorage > &p) const
Return true if this point is below a given point.
Component Coordinate
Type for Point elements.
Self & partialCopyInv(const PointVector< dim, OtherComponent, OtherContainer > &pv, const std::vector< Dimension > &dimensions)
Partial copy of a given PointVector.
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
size_t Size
Type used to represent sizes in the digital space.
DGtal::Dimension Dimension
Copy of the type used for the dimension.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Aim: range through some subdomain of all the points in the domain. Defines a constructor taking a dom...
Point myStartingPoint
Starting point of the subrange.
ConstSubRange(const HyperRectDomain< TSpace > &domain, Dimension adim, const Point &startingPoint)
ConstSubRange(const HyperRectDomain< TSpace > &domain, const std::vector< Dimension > &permutation, const Point &startingPoint)
Point myUpperBound
Upper bound of the subrange.
ConstIterator begin(const Point &aPoint) const
HyperRectDomain_subIterator< Point > ConstIterator
ConstReverseIterator rbegin() const
ConstIterator end() const
ConstReverseIterator rbegin(const Point &aPoint) const
ConstSubRange(const HyperRectDomain< TSpace > &domain, Dimension adim1, Dimension adim2, const Point &startingPoint)
ConstIterator begin() const
ConstSubRange(const HyperRectDomain< TSpace > &domain, std::initializer_list< Dimension > permutation, const Point &startingPoint)
ConstReverseIterator rend() const
ConstSubRange(const HyperRectDomain< TSpace > &domain, Dimension adim1, Dimension adim2, Dimension adim3, const Point &startingPoint)
HyperRectDomain_ReverseIterator< ConstIterator > ConstReverseIterator
Point myLowerBound
Lower bound of the subrange.
std::vector< Dimension > myPermutation
Permutation on dimensions used in the subrange.
Aim: The traits class for all models of Cinteger.
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.