DGtal
1.5.beta
|
Aim: Useful to compute quickly the lattice points within a polytope, i.e. a convex polyhedron. More...
#include <DGtal/geometry/volumes/BoundedLatticePolytopeCounter.h>
Public Types | |
typedef BoundedLatticePolytopeCounter< TSpace > | Self |
typedef TSpace | Space |
typedef BoundedLatticePolytope< TSpace > | Polytope |
using | Integer = typename Polytope::Integer |
using | Point = typename Polytope::Point |
using | Vector = typename Polytope::Vector |
using | InequalityMatrix = typename Polytope::InequalityMatrix |
using | InequalityVector = typename Polytope::InequalityVector |
using | Domain = typename Polytope::Domain |
using | HalfSpace = typename Polytope::HalfSpace |
using | BigInteger = typename Polytope::BigInteger |
using | Intervals = IntegralIntervals< Integer > |
using | Interval = typename Intervals::Interval |
using | PointRange = std::vector< Point > |
using | LatticeSetByInterval = std::map< Point, Interval > |
Internal type used to represent a convex lattice point set. More... | |
using | LatticeSetByIntervals = std::map< Point, Intervals > |
Internal type used to represent any lattice point set. More... | |
Public Member Functions | |
BoundedLatticePolytopeCounter ()=default | |
Default constructor. More... | |
BoundedLatticePolytopeCounter (const Polytope &P) | |
void | init (const Polytope *ptrP) |
Interval | intersectionIntervalAlongAxis (Point p, Dimension a) const |
Interval | interiorIntersectionIntervalAlongAxis (Point p, Dimension a) const |
Integer | countAlongAxis (Dimension a) const |
Integer | countInteriorAlongAxis (Dimension a) const |
void | getPointsAlongAxis (PointRange &pts, Dimension a) const |
void | getInteriorPointsAlongAxis (PointRange &pts, Dimension a) const |
LatticeSetByInterval | getLatticeSet (Dimension a) const |
LatticeSetByInterval | getLatticeCells (Dimension a) const |
Dimension | longestAxis () const |
Point | lowerBound () const |
Point | upperBound () const |
Data Fields | |
const Polytope * | myPolytope |
The associated polytope. More... | |
Point | myLower |
The lower point of the tight bounding box to the associated polytope. More... | |
Point | myUpper |
The upper point of the tight bounding box to the associated polytope. More... | |
Static Public Attributes | |
static const Dimension | dimension = Space::dimension |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CSpace< TSpace >)) | |
Aim: Useful to compute quickly the lattice points within a polytope, i.e. a convex polyhedron.
Description of template class 'BoundedLatticePolytopeCounter'
It is a model of boost::CopyConstructible, boost::DefaultConstructible, boost::Assignable.
TSpace | an arbitrary model of CSpace. |
Definition at line 66 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::BigInteger = typename Polytope::BigInteger |
Definition at line 80 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::Domain = typename Polytope::Domain |
Definition at line 78 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::HalfSpace = typename Polytope::HalfSpace |
Definition at line 79 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::InequalityMatrix = typename Polytope::InequalityMatrix |
Definition at line 76 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::InequalityVector = typename Polytope::InequalityVector |
Definition at line 77 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::Integer = typename Polytope::Integer |
Definition at line 73 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::Interval = typename Intervals::Interval |
Definition at line 82 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::Intervals = IntegralIntervals< Integer > |
Definition at line 81 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::LatticeSetByInterval = std::map< Point, Interval > |
Internal type used to represent a convex lattice point set.
Definition at line 87 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::LatticeSetByIntervals = std::map< Point, Intervals > |
Internal type used to represent any lattice point set.
Definition at line 90 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::Point = typename Polytope::Point |
Definition at line 74 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::PointRange = std::vector< Point > |
Definition at line 83 of file BoundedLatticePolytopeCounter.h.
typedef BoundedLatticePolytope<TSpace> DGtal::BoundedLatticePolytopeCounter< TSpace >::Polytope |
Definition at line 72 of file BoundedLatticePolytopeCounter.h.
typedef BoundedLatticePolytopeCounter<TSpace> DGtal::BoundedLatticePolytopeCounter< TSpace >::Self |
Definition at line 70 of file BoundedLatticePolytopeCounter.h.
typedef TSpace DGtal::BoundedLatticePolytopeCounter< TSpace >::Space |
Definition at line 71 of file BoundedLatticePolytopeCounter.h.
using DGtal::BoundedLatticePolytopeCounter< TSpace >::Vector = typename Polytope::Vector |
Definition at line 75 of file BoundedLatticePolytopeCounter.h.
|
default |
Default constructor.
DGtal::BoundedLatticePolytopeCounter< TSpace >::BoundedLatticePolytopeCounter | ( | const Polytope & | P | ) |
Constructor from valid polytope
P | any polytope |
|
private |
Integer DGtal::BoundedLatticePolytopeCounter< TSpace >::countAlongAxis | ( | Dimension | a | ) | const |
a | any axis with 0 <= a < d, where d is the dimension of the space. |
Integer DGtal::BoundedLatticePolytopeCounter< TSpace >::countInteriorAlongAxis | ( | Dimension | a | ) | const |
a | any axis with 0 <= a < d, where d is the dimension of the space. |
void DGtal::BoundedLatticePolytopeCounter< TSpace >::getInteriorPointsAlongAxis | ( | PointRange & | pts, |
Dimension | a | ||
) | const |
[out] | pts | the range of lattice points that are interior to this polytope. |
a | any axis with 0 <= a < d, where d is the dimension of the space. |
LatticeSetByInterval DGtal::BoundedLatticePolytopeCounter< TSpace >::getLatticeCells | ( | Dimension | a | ) | const |
a | any axis with 0 <= a < d, where d is the dimension of the space. |
LatticeSetByInterval DGtal::BoundedLatticePolytopeCounter< TSpace >::getLatticeSet | ( | Dimension | a | ) | const |
a | any axis with 0 <= a < d, where d is the dimension of the space. |
void DGtal::BoundedLatticePolytopeCounter< TSpace >::getPointsAlongAxis | ( | PointRange & | pts, |
Dimension | a | ||
) | const |
[out] | pts | the range of lattice points that are inside this polytope. |
a | any axis with 0 <= a < d, where d is the dimension of the space. |
void DGtal::BoundedLatticePolytopeCounter< TSpace >::init | ( | const Polytope * | ptrP | ) |
Initialization from polytope pointer (nullptr if you want to create an invalid polytope).
ptrP | any pointer on a polytope or nullptr. |
Interval DGtal::BoundedLatticePolytopeCounter< TSpace >::interiorIntersectionIntervalAlongAxis | ( | Point | p, |
Dimension | a | ||
) | const |
Computes the intersection of the lattice points of the infinite line going through point p along axis a and the interior of the current polytope, returned as an interval [b,e)
, where b
is the a-th coordinate of the first lattice point in common, while e
is the a-th coordinate after the last lattice point in common.
p | any point with the current domain |
a | any axis between 0 (included) and dimension (excluded). |
[b,e)
of intersection, which is such that b==e
when there is no intersection. Interval DGtal::BoundedLatticePolytopeCounter< TSpace >::intersectionIntervalAlongAxis | ( | Point | p, |
Dimension | a | ||
) | const |
Computes the intersection of the lattice points of the infinite line going through point p along axis a and the current polytope, returned as an interval [b,e)
, where b
is the a-th coordinate of the first lattice point in common, while e
is the a-th coordinate after the last lattice point in common.
p | any point with the current domain |
a | any axis between 0 (included) and dimension (excluded). |
[b,e)
of intersection, which is such that b==e
when there is no intersection. Dimension DGtal::BoundedLatticePolytopeCounter< TSpace >::longestAxis | ( | ) | const |
|
inline |
Definition at line 197 of file BoundedLatticePolytopeCounter.h.
References DGtal::BoundedLatticePolytopeCounter< TSpace >::myLower.
|
inline |
Definition at line 199 of file BoundedLatticePolytopeCounter.h.
References DGtal::BoundedLatticePolytopeCounter< TSpace >::myUpper.
|
static |
Definition at line 84 of file BoundedLatticePolytopeCounter.h.
Point DGtal::BoundedLatticePolytopeCounter< TSpace >::myLower |
The lower point of the tight bounding box to the associated polytope.
Definition at line 206 of file BoundedLatticePolytopeCounter.h.
Referenced by DGtal::BoundedLatticePolytopeCounter< TSpace >::lowerBound().
const Polytope* DGtal::BoundedLatticePolytopeCounter< TSpace >::myPolytope |
The associated polytope.
Definition at line 204 of file BoundedLatticePolytopeCounter.h.
Point DGtal::BoundedLatticePolytopeCounter< TSpace >::myUpper |
The upper point of the tight bounding box to the associated polytope.
Definition at line 208 of file BoundedLatticePolytopeCounter.h.
Referenced by DGtal::BoundedLatticePolytopeCounter< TSpace >::upperBound().