Loading [MathJax]/extensions/TeX/AMSsymbols.js
DGtal 2.0.0
BoundedLatticePolytopeCounter.h
1
16
17#pragma once
18
30
31#if defined(BoundedLatticePolytopeCounter_RECURSES)
32#error Recursive header files inclusion detected in BoundedLatticePolytopeCounter.h
33#else // defined(BoundedLatticePolytopeCounter_RECURSES)
35#define BoundedLatticePolytopeCounter_RECURSES
36
37
38#if !defined BoundedLatticePolytopeCounter_h
40#define BoundedLatticePolytopeCounter_h
41
43// Inclusions
44#include <iostream>
45#include <map>
46#include "DGtal/kernel/IntegralIntervals.h"
47#include "DGtal/geometry/volumes/BoundedLatticePolytope.h"
49
50namespace DGtal
51{
52
54 // template class BoundedLatticePolytopeCounter
65 template < typename TSpace >
67 {
69 public:
71 typedef TSpace Space;
73 using Integer = typename Polytope::Integer;
74 using Point = typename Polytope::Point;
75 using Vector = typename Polytope::Vector;
78 using Domain = typename Polytope::Domain;
82 using Interval = typename Intervals::Interval;
83 using PointRange = std::vector< Point >;
85
87 using LatticeSetByInterval = std::map< Point, Interval >;
88
90 using LatticeSetByIntervals = std::map< Point, Intervals >;
91
94
98
102 void init( const Polytope* ptrP );
103
117
131
141
151
161
171
178
190
194
196 Point lowerBound() const { return myLower; }
198 Point upperBound() const { return myUpper; }
199
200
201 // --------------------------- protected datas -----------------------------------
208 };
209
210} // namespace DGtal
211
212
214// Includes inline functions.
215#include "BoundedLatticePolytopeCounter.ih"
216
217// //
219
220#endif // !defined BoundedLatticePolytopeCounter_h
221
222#undef BoundedLatticePolytopeCounter_RECURSES
223#endif // else defined(BoundedLatticePolytopeCounter_RECURSES)
224
LatticeSetByInterval getLatticeCells(Dimension a) const
LatticeSetByInterval getLatticeSet(Dimension a) const
typename Polytope::InequalityVector InequalityVector
typename Polytope::InequalityMatrix InequalityMatrix
Interval interiorIntersectionIntervalAlongAxis(Point p, Dimension a) const
std::map< Point, Interval > LatticeSetByInterval
Internal type used to represent a convex lattice point set.
BoundedLatticePolytopeCounter(const Polytope &P)
void getInteriorPointsAlongAxis(PointRange &pts, Dimension a) const
BoundedLatticePolytopeCounter< TSpace > Self
Interval intersectionIntervalAlongAxis(Point p, Dimension a) const
void init(const Polytope *ptrP)
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Integer countAlongAxis(Dimension a) const
void getPointsAlongAxis(PointRange &pts, Dimension a) const
Integer countInteriorAlongAxis(Dimension a) const
std::map< Point, Intervals > LatticeSetByIntervals
Internal type used to represent any lattice point set.
BoundedLatticePolytopeCounter()=default
Default constructor.
Aim: Represents an nD lattice polytope, i.e. a convex polyhedron bounded with vertices with integer c...
ClosedIntegerHalfPlane< Space > HalfSpace
std::vector< Integer > InequalityVector
std::pair< Integer, Integer > Interval
static const Dimension dimension
Definition SpaceND.h:132
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::uint32_t Dimension
Definition Common.h:119
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition CSpace.h:106