31 #if defined(EhrhartPolynomial_RECURSES)
32 #error Recursive header files inclusion detected in EhrhartPolynomial.h
35 #define EhrhartPolynomial_RECURSES
37 #if !defined EhrhartPolynomial_h
39 #define EhrhartPolynomial_h
45 #include "DGtal/base/Common.h"
46 #include "DGtal/kernel/NumberTraits.h"
47 #include "DGtal/kernel/CInteger.h"
48 #include "DGtal/kernel/CSpace.h"
49 #include "DGtal/math/LagrangeInterpolation.h"
50 #include "DGtal/geometry/volumes/BoundedLatticePolytope.h"
65 template <
typename TSpace,
typename TInteger>
147 std::vector< Integer > X( Space::dimension + 1 );
148 std::vector< Integer > Y( Space::dimension + 1 );
151 for (
Integer i = 1; i <= Space::dimension; ++i )
160 myE =
L.polynomial( Y );
161 myD =
L.denominator();
204 that_stream <<
"[EhrhartPolynomial num=" <<
numerator()
235 template <
typename TSpace,
typename TInteger>
256 #undef EhrhartPolynomial_RECURSES
Aim: Represents an nD lattice polytope, i.e. a convex polyhedron bounded with vertices with integer c...
Aim: This class implements the class Ehrhart Polynomial which is related to lattice point enumeration...
Integer countInterior(Integer t) const
void init(const LatticePolytope &polytope)
EhrhartPolynomial & operator=(const EhrhartPolynomial &other)=default
BoundedLatticePolytope< Space > LatticePolytope
LagrangeInterpolation< Integer > Lagrange
void selfDisplay(std::ostream &that_stream) const
EhrhartPolynomial< TSpace, TInteger > Self
EhrhartPolynomial(const LatticePolytope &polytope)
EhrhartPolynomial(EhrhartPolynomial &&other)=default
Integer myD
The (integral) denominator of the Ehrhart polynomial.
Integer remainder(Integer t) const
~EhrhartPolynomial()=default
Integer denominator() const
The (integral) denominator of the Ehrhart polynomial.
Lagrange::Polynomial Polynomial
Polynomial myE
The Ehrhart polynomial (integral numerator part)
BOOST_CONCEPT_ASSERT((concepts::CInteger< TInteger >))
EhrhartPolynomial(const EhrhartPolynomial &other)=default
Polynomial numerator() const
EhrhartPolynomial & operator=(EhrhartPolynomial &&other)=default
Integer count(Integer t) const
Integer remainderInterior(Integer t) const
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Aim: This class implements Lagrange basis functions and Lagrange interpolation.
Aim: Represents a multivariate polynomial, i.e. an element of , where K is some ring or field.
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Aim: The traits class for all models of Cinteger.
Aim: Concept checking for Integer Numbers. More precisely, this concept is a refinement of both CEucl...
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.