4 #include <barvinok/polylib.h>
6 #if defined(__cplusplus)
10 #include <barvinok/evalue.h>
14 ((F_ISSET(P, POL_INEQUALITIES) && P->NbEq > P->Dimension) || \
15 (F_ISSET(P, POL_POINTS) && P->NbRays == 0))
16 #define POL_HAS(P,f) (F_ISSET(P, f))
17 #define POL_SET(P,f) (F_SET(P, f))
20 #define emptyQ2(P) emptyQ(P)
21 #define POL_ENSURE_FACETS(P) /* nothing */
22 #define POL_ENSURE_VERTICES(P) /* nothing */
23 #define POL_INEQUALITIES 0
26 #define POL_VERTICES 0
28 #define POL_HAS(P,f) (1)
29 #define POL_SET(P,f) /* nothing */
36 void value_lcm(const Value i
, const Value j
, Value
* lcm
);
37 int random_int(int max
);
38 Polyhedron
*Polyhedron_Read(unsigned MaxRays
);
39 Polyhedron
* Polyhedron_Polar(Polyhedron
*P
, unsigned NbMaxRays
);
40 void Polyhedron_Polarize(Polyhedron
*P
);
41 Polyhedron
* supporting_cone(Polyhedron
*P
, int v
);
42 unsigned char *supporting_constraints(Polyhedron
*P
, Param_Vertices
*v
, int *n
);
43 Polyhedron
* supporting_cone_p(Polyhedron
*P
, Param_Vertices
*v
);
44 Polyhedron
* triangulate_cone(Polyhedron
*P
, unsigned NbMaxCons
);
45 void check_triangulization(Polyhedron
*P
, Polyhedron
*T
);
46 Polyhedron
*remove_equalities(Polyhedron
*P
);
47 Polyhedron
*remove_equalities_p(Polyhedron
*P
, unsigned nvar
, Matrix
**factor
);
48 void manual_count(Polyhedron
*P
, Value
* result
);
49 Polyhedron
* Polyhedron_Factor(Polyhedron
*P
, unsigned nparam
, Matrix
**T
,
51 void Line_Length(Polyhedron
*P
, Value
*len
);
52 struct barvinok_options
;
53 evalue
* ParamLine_Length(Polyhedron
*P
, Polyhedron
*C
,
54 struct barvinok_options
*options
);
55 void Extended_Euclid(Value a
, Value b
, Value
*x
, Value
*y
, Value
*g
);
56 Matrix
* unimodular_complete(Vector
*row
);
57 Bool
isIdentity(Matrix
*M
);
58 void Param_Polyhedron_Print(FILE* DST
, Param_Polyhedron
*PP
, char **param_names
);
59 void Enumeration_Print(FILE *Dst
, Enumeration
*en
, char **params
);
60 void Enumeration_Free(Enumeration
*en
);
61 void Enumeration_mod2table(Enumeration
*en
, unsigned nparam
);
62 size_t Enumeration_size(Enumeration
*en
);
63 void Free_ParamNames(char **params
, int m
);
64 int DomainIncludes(Polyhedron
*Pol1
, Polyhedron
*Pol2
);
65 #ifndef HAVE_DOMAINCONSTRAINTSIMPLIFY
66 int ConstraintSimplify(Value
*old
, Value
*n
, int len
, Value
* v
);
67 Polyhedron
*DomainConstraintSimplify(Polyhedron
*P
, unsigned MaxRays
);
69 int line_minmax(Polyhedron
*I
, Value
*min
, Value
*max
);
70 void count_points_e (int pos
, Polyhedron
*P
, int exist
, int nparam
,
71 Value
*context
, Value
*res
);
72 int DomainContains(Polyhedron
*P
, Value
*list_args
, int len
,
73 unsigned MaxRays
, int set
);
74 Polyhedron
* Polyhedron_Project(Polyhedron
*P
, int dim
);
75 Polyhedron
*DomainConcat(Polyhedron
*head
, Polyhedron
*tail
);
77 /* only defined if PolyLib has RankingConstraints */
78 evalue
*barvinok_lexsmaller_ev(Polyhedron
*P
, Polyhedron
*D
, unsigned dim
,
79 Polyhedron
*C
, unsigned MaxRays
);
80 Enumeration
*barvinok_lexsmaller(Polyhedron
*P
, Polyhedron
*D
, unsigned dim
,
81 Polyhedron
*C
, unsigned MaxRays
);
83 Matrix
*align_matrix(Matrix
*M
, int nrows
);
85 char **util_generate_names(int n
, char *prefix
);
86 void util_free_names(int n
, char **names
);
87 void Polyhedron_pprint(FILE *out
, Polyhedron
*P
, int dim
, int nparam
,
88 char **iter_names
, char **param_names
);
90 Polyhedron
*Cone_over_Polyhedron(Polyhedron
*P
);
92 Matrix
*compress_variables(Matrix
*Equalities
, unsigned nparam
);
93 Matrix
*left_inverse(Matrix
*M
, Matrix
**Eq
);
95 int Polyhedron_has_revlex_positive_rays(Polyhedron
*P
, unsigned nparam
);
96 int Polyhedron_is_unbounded(Polyhedron
*P
, unsigned nparam
, unsigned MaxRays
);
98 const char *barvinok_version();
100 #if defined(__cplusplus)