6 #include <barvinok/barvinok.h>
9 namespace polymake
{ namespace polytope
{
11 void lattice_points(Poly
& p
)
14 Matrix
<Rational
> F
= p
.give("FACETS | INEQUALITIES");
15 ::Matrix
*M
= polymake_constraints2polylib(F
);
16 Polyhedron
*A
= Constraints2Polyhedron(M
, 0);
19 barvinok_count(A
, &cb
, 0);
23 p
.take("LATTICE_POINTS") << count
;
28 using namespace polymake
;
30 int main(int argc
, const char *argv
[])
36 Poly
p(argv
[1], ios::in
| ios::out
);
37 polytope::lattice_points(p
);
38 } catch (const std::exception
& e
) {
39 cerr
<< e
.what() << endl
;