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)
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 & begin() const
const Point & lowerBound() const
ReverseIterator ConstReverseIterator
ConstSubRange subRange(std::initializer_list< Dimension > permutation)
ConstReverseIterator rbegin() const
const Predicate & predicate() const
HyperRectDomain & operator=(const HyperRectDomain &other)
ConstIterator myIteratorBegin
Begin iterator.
const Point & upperBound() const
ConstSubRange subRange(Dimension adim, const Point &startingPoint) const
HyperRectDomain(const Point &lowerPoint, const Point &upperPoint)
ConstSubRange subRange(const std::vector< Dimension > &permutation) const
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)
const ConstIterator & end() const
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.
Self & partialCopyInv(const PointVector< dim, OtherComponent, OtherContainer > &pv, const std::vector< Dimension > &dimensions)
Partial copy of a given PointVector.
Component Coordinate
Type for Point elements.
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
size_t Size
Type used to represent sizes in the digital space.
static const Dimension dimension
static constants to store the dimension.
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 ClosedIntegerHalfPlane< TSpace > &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.
Aim: The predicate returns true when the point is within the given bounds.