barvinok_enumerate: make sure the input polyhedra are fully specified.
[barvinok.git] / util.h
blobf850e0864ca19efba227d09db412b34aceb331c4
1 #ifndef UTIL_H
2 #define UTIL_H
4 #if defined(__cplusplus)
5 extern "C" {
6 #endif
8 #include <polylib/polylibgmp.h>
9 #include "ev_operations.h"
11 #ifdef POL_NO_DUAL
12 #define emptyQ2(P) \
13 ((F_ISSET(P, POL_INEQUALITIES) && P->NbEq > P->Dimension) || \
14 (F_ISSET(P, POL_POINTS) && P->NbRays == 0))
15 #else
16 #define POL_NO_DUAL 0
17 #define emptyQ2(P) emptyQ(P)
18 #define POL_ENSURE_FACETS(P) /* nothing */
19 #define POL_ENSURE_VERTICES(P) /* nothing */
20 #endif
22 void value_lcm(Value i, Value j, Value* lcm);
23 int random_int(int max);
24 Polyhedron* Polyhedron_Polar(Polyhedron *P, unsigned NbMaxRays);
25 void Polyhedron_Polarize(Polyhedron *P);
26 Polyhedron* supporting_cone(Polyhedron *P, int v);
27 Polyhedron* supporting_cone_p(Polyhedron *P, Param_Vertices *v);
28 Polyhedron* triangularize_cone(Polyhedron *P, unsigned NbMaxCons);
29 void check_triangulization(Polyhedron *P, Polyhedron *T);
30 Polyhedron *remove_equalities(Polyhedron *P);
31 Polyhedron *remove_equalities_p(Polyhedron *P, unsigned nvar, Matrix **factor);
32 void manual_count(Polyhedron *P, Value* result);
33 Polyhedron* Polyhedron_Factor(Polyhedron *P, unsigned nparam,
34 unsigned NbMaxRays);
35 void Line_Length(Polyhedron *P, Value *len);
36 evalue* ParamLine_Length(Polyhedron *P, Polyhedron *C, unsigned MaxRays);
37 Polyhedron* Polyhedron_Reduce(Polyhedron *P, Value* factor);
38 Matrix * unimodular_complete(Vector *row);
39 Bool isIdentity(Matrix *M);
40 void Param_Polyhedron_Print(FILE* DST, Param_Polyhedron *PP, char **param_names);
41 void Enumeration_Print(FILE *Dst, Enumeration *en, char **params);
42 void Enumeration_mod2table(Enumeration *en, unsigned nparam);
43 size_t Enumeration_size(Enumeration *en);
44 void Free_ParamNames(char **params, int m);
45 int DomainIncludes(Polyhedron *Pol1, Polyhedron *Pol2);
46 int ConstraintSimplify(Value *old, Value *n, int len, Value* v);
47 Polyhedron *DomainConstraintSimplify(Polyhedron *P, unsigned MaxRays);
48 int line_minmax(Polyhedron *I, Value *min, Value *max);
49 void count_points_e (int pos, Polyhedron *P, int exist, int nparam,
50 Value *context, Value *res);
51 int DomainContains(Polyhedron *P, Value *list_args, int len,
52 unsigned MaxRays, int set);
53 Polyhedron* Polyhedron_Project(Polyhedron *P, int dim);
55 const char *barvinok_version();
57 #include "ev_operations.h"
59 Polyhedron* ParamPolyhedron_Reduce(Polyhedron *P, unsigned nvar,
60 evalue* factor);
62 #if defined(__cplusplus)
64 #endif
66 #endif