genfun.cc: move lex_cmp to mat_util.cc
[barvinok.git] / decomposer.h
blobe3c9bac83775a640a7462372ae399c771e0578cb
1 #ifndef DECOMPOSER_H
2 #define DECOMPOSER_H
4 #include <gmp.h>
5 #include <barvinok/polylib.h>
6 #include <barvinok/options.h>
8 struct decomposer {
9 void decompose(Polyhedron *C, barvinok_options *options);
10 virtual void handle(Polyhedron *P, int sign) = 0;
13 struct polar_decomposer : public decomposer {
14 void decompose(Polyhedron *C, barvinok_options *options);
15 virtual void handle(Polyhedron *P, int sign);
16 virtual void handle_polar(Polyhedron *P, int sign) = 0;
19 struct vertex_decomposer {
20 Polyhedron *P;
21 unsigned nbV; // number of vertices
22 Param_Vertices *V; // current vertex
23 int vert; // current vertex index
24 polar_decomposer *pd;
26 vertex_decomposer(Polyhedron *P, unsigned nbV, polar_decomposer *pd) :
27 P(P), nbV(nbV), pd(pd) {}
28 void decompose_at_vertex(Param_Vertices *V, int _i, barvinok_options *options);
31 #endif