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."
472 ConstSubRange
subRange(
const std::vector<Dimension> & permutation)
const
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);
485 ConstSubRange
subRange(
const std::vector<Dimension> & permutation, {
…}
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)
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);
552 ConstSubRange
subRange(std::initializer_list<Dimension> permutation, {
…}
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'.
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
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
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
std::string className() const
HyperRectDomain_Iterator< Point > Iterator
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< Space > Self
ConstSubRange subRange(Dimension adim1, Dimension adim2, const Point &startingPoint) const
ConstIterator myIteratorEnd
PointVector< dim, Integer > Point
PointVector< dim, double > RealPoint
static const Dimension dimension
PointVector< dim, Integer > Vector
DGtal::Dimension Dimension
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
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.
static constexpr DGtal::uint64_t castToUInt64_t(const T &aT) noexcept
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.