32 #if defined(HyperRectDomain_RECURSES)
33 #error Recursive header files inclusion detected in HyperRectDomain.h
34 #else // defined(HyperRectDomain_RECURSES)
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."
472 ConstSubRange
subRange(
const std::vector<Dimension> & permutation)
const
485 ConstSubRange
subRange(
const std::vector<Dimension> & permutation,
486 const Point & startingPoint)
const
488 return ConstSubRange(*
this, permutation, startingPoint);
499 const Point & startingPoint)
const
501 return ConstSubRange(*
this, adim, startingPoint);
513 const Point & startingPoint)
const
515 return ConstSubRange(*
this, adim1, adim2, startingPoint);
528 const Point & startingPoint)
const
530 return ConstSubRange(*
this, adim1, adim2, adim3, startingPoint);
539 ConstSubRange
subRange(std::initializer_list<Dimension> permutation)
552 ConstSubRange
subRange(std::initializer_list<Dimension> permutation,
553 const Point & startingPoint)
555 return ConstSubRange(*
this, permutation, startingPoint);
571 for ( it = e.
begin(), itEnd = e.
end(); it != itEnd; ++it)
669 template<
typename TSpace>
679 #include "DGtal/kernel/domains/HyperRectDomain.ih"
684 #endif // !defined HyperRectDomain_h
686 #undef HyperRectDomain_RECURSES
687 #endif // else defined(HyperRectDomain_RECURSES)
ConstReverseIterator rend() const
DGtal::Dimension Dimension
Copy of the type used for the dimension.
Space::Dimension Dimension
ConstReverseIterator rbegin(const Point &aPoint) const
Self & partialCopyInv(const PointVector< dim, OtherComponent, OtherContainer > &pv, const std::vector< Dimension > &dimensions)
Partial copy of a given PointVector.
Aim: range through some subdomain of all the points in the domain. Defines a constructor taking a dom...
Aim: Parallelepidec region of a digital space, model of a 'CDomain'.
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Reverse iterator for HyperRectDomain.
bool isInside(const Point &p) const
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
ReverseIterator ConstReverseIterator
Component Coordinate
Type for Point elements.
ConstIterator end() const
const Point & upperBound() const
HyperRectDomain< TSpace > Self
UnsignedInteger Size
Type used to represent sizes in the digital space.
Point::Coordinate Coordinate
BOOST_STATIC_CONSTANT(Dimension, dimension=Space::dimension)
std::string className() const
HyperRectDomain< Space > Domain
static Self diagonal(Component val=1)
Predicate myPredicate
"IsInside" predicate.
Point myUpperBound
Upper bound of the subrange.
Point myLowerBound
The lowest point of the space diagonal.
ConstSubRange subRange(Dimension adim1, Dimension adim2, const Point &startingPoint) const
ConstSubRange subRange(const std::vector< Dimension > &permutation, const Point &startingPoint) const
ConstSubRange(const HyperRectDomain< TSpace > &domain, const std::vector< Dimension > &permutation, const Point &startingPoint)
Point myStartingPoint
Starting point of the subrange.
ConstReverseIterator rbegin(const Point &aPoint) const
ConstIterator myIteratorEnd
End iterator.
HyperRectDomain(const typename Space::RealPoint &lowerPoint, const typename Space::RealPoint &upperPoint)
DGtal is the top-level namespace which contains all DGtal functions and types.
const Predicate & predicate() const
ConstSubRange subRange(std::initializer_list< Dimension > permutation, const Point &startingPoint)
HyperRectDomain(const Point &lowerPoint, const Point &upperPoint)
ConstIterator begin(const Point &aPoint) const
void selfDisplay(std::ostream &out) const
ConstReverseIterator rbegin() const
static const Dimension dimension
static constants to store the dimension.
Container::const_iterator ConstIterator
Constant iterator type.
ConstSubRange(const HyperRectDomain< TSpace > &domain, Dimension adim1, Dimension adim2, const Point &startingPoint)
const ConstIterator & end() const
ConstSubRange subRange(std::initializer_list< Dimension > permutation)
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
ConstSubRange(const HyperRectDomain< TSpace > &domain, std::initializer_list< Dimension > permutation, const Point &startingPoint)
ConstSubRange subRange(Dimension adim, const Point &startingPoint) const
ConstReverseIterator rend() const
ConstIterator myIteratorBegin
Begin iterator.
HyperRectDomain_ReverseIterator< Iterator > ReverseIterator
Iterator for HyperRectDomain.
ConstIterator begin() const
ConstSubRange(const HyperRectDomain< TSpace > &domain, Dimension adim, const Point &startingPoint)
HyperRectDomain_subIterator< Point > ConstIterator
functors::IsWithinPointPredicate< Point > Predicate
HyperRectDomain & operator=(const HyperRectDomain &other)
ConstSubRange(const HyperRectDomain< TSpace > &domain, Dimension adim1, Dimension adim2, Dimension adim3, const Point &startingPoint)
ConstSubRange subRange(const std::vector< Dimension > &permutation) const
HyperRectDomain_ReverseIterator< ConstIterator > ConstReverseIterator
Point myLowerBound
Lower bound of the subrange.
const ConstIterator & begin() const
ConstReverseIterator rbegin() const
bool isLower(const PointVector< dim, OtherComponent, OtherStorage > &p) const
Return true if this point is below a given point.
HyperRectDomain_Iterator< Point > Iterator
Typedef of domain iterators.
HyperRectDomain(const HyperRectDomain &other)
std::vector< Dimension > myPermutation
Permutation on dimensions used in the subrange.
ConstIterator begin(const Point &aPoint) const
Point myUpperBound
The highest point of the space diagonal.
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
ConstSubRange subRange(Dimension adim1, Dimension adim2, Dimension adim3, const Point &startingPoint) const
const Point & lowerBound() const