barvinok_summate: correct options description
[barvinok.git] / decomposer.h
blob3cbcd733b7cda5b1e72f4441c1f89821a21bd084
1 #ifndef DECOMPOSER_H
2 #define DECOMPOSER_H
4 #include <gmp.h>
5 #include <NTL/mat_ZZ.h>
6 #include <barvinok/polylib.h>
7 #include <barvinok/options.h>
9 #ifdef NTL_STD_CXX
10 using namespace NTL;
11 #endif
13 struct signed_cone {
14 signed_cone(const mat_ZZ& rays, int sign, unsigned long det) :
15 C(NULL), rays(rays), sign(sign), det(det) {}
16 signed_cone(Polyhedron *C, const mat_ZZ& rays, int sign,
17 unsigned long det = 0) :
18 C(C), rays(rays), sign(sign), det(det) {}
19 Polyhedron *C;
20 const mat_ZZ& rays;
21 int sign;
22 unsigned long det;
25 struct signed_cone_consumer {
26 virtual void handle(const signed_cone& sc, barvinok_options *options) = 0;
27 virtual ~signed_cone_consumer() {}
30 struct vertex_decomposer {
31 Polyhedron *P;
32 unsigned nbV; // number of vertices
33 Param_Vertices *V; // current vertex
34 int vert; // current vertex index
35 signed_cone_consumer& scc;
37 vertex_decomposer(Polyhedron *P, unsigned nbV, signed_cone_consumer& scc) :
38 P(P), nbV(nbV), scc(scc) {}
39 void decompose_at_vertex(Param_Vertices *V, int _i, barvinok_options *options);
42 void barvinok_decompose(Polyhedron *C, signed_cone_consumer& scc,
43 barvinok_options *options);
45 #endif