decomposer.cc: short_vector: negate lambda if z is negated
[barvinok.git] / decomposer.h
blob39acaf9bc9c84feda017286e95ea7b34fd03d4f8
1 #ifndef DECOMPOSER_H
2 #define DECOMPOSER_H
4 #include <gmp.h>
5 #include <barvinok/polylib.h>
6 #include <barvinok/options.h>
8 struct signed_cone {
9 signed_cone(Polyhedron *C, int sign) : C(C), sign(sign), closed(NULL) {}
10 signed_cone(Polyhedron *C, int sign, int *closed) :
11 C(C), sign(sign), closed(closed) {}
12 Polyhedron *C;
13 int sign;
14 /* facet not containing ray is closed */
15 int *closed;
18 struct signed_cone_consumer {
19 virtual void handle(const signed_cone& sc) = 0;
22 struct vertex_decomposer {
23 Polyhedron *P;
24 unsigned nbV; // number of vertices
25 Param_Vertices *V; // current vertex
26 int vert; // current vertex index
27 signed_cone_consumer& scc;
29 vertex_decomposer(Polyhedron *P, unsigned nbV, signed_cone_consumer& scc) :
30 P(P), nbV(nbV), scc(scc) {}
31 void decompose_at_vertex(Param_Vertices *V, int _i, barvinok_options *options);
34 void barvinok_decompose(Polyhedron *C, signed_cone_consumer& scc,
35 barvinok_options *options);
37 #endif