update isl to version 0.25
[barvinok.git] / decomposer.h
blob67bf4d260e928fd4fbe260f649b8695e25479ec6
1 #ifndef DECOMPOSER_H
2 #define DECOMPOSER_H
4 #include <NTL/mat_ZZ.h>
5 #include <barvinok/polylib.h>
6 #include <barvinok/options.h>
8 using namespace NTL;
10 struct signed_cone {
11 signed_cone(const mat_ZZ& rays, int sign, unsigned long det) :
12 C(NULL), rays(rays), sign(sign), det(det) {}
13 signed_cone(Polyhedron *C, const mat_ZZ& rays, int sign,
14 unsigned long det = 0) :
15 C(C), rays(rays), sign(sign), det(det) {}
16 Polyhedron *C;
17 const mat_ZZ& rays;
18 int sign;
19 unsigned long det;
22 struct signed_cone_consumer {
23 virtual void handle(const signed_cone& sc, barvinok_options *options) = 0;
24 virtual ~signed_cone_consumer() {}
27 struct vertex_decomposer {
28 Param_Polyhedron *PP;
29 Param_Vertices *V; // current vertex
30 int vert; // current vertex index
31 signed_cone_consumer& scc;
33 vertex_decomposer(Param_Polyhedron *PP, signed_cone_consumer& scc) :
34 PP(PP), scc(scc) {}
35 void decompose_at_vertex(Param_Vertices *V, int _i, barvinok_options *options);
38 void barvinok_decompose(Polyhedron *C, signed_cone_consumer& scc,
39 barvinok_options *options);
41 #endif