47#define EPRINT_ALL_VALIDITY_CONSTRAINTS
70#define ALL_OVERFLOW_WARNINGS
96 fprintf(stderr,
"Allocating enode of size 0 !\n");
103 for (i = 0; i < size; i++) {
131 for (i = 0; i < p->
size; i++) {
150 for (i = 0; i < e->
size; ++i) {
194 fprintf(DST,
"NULL");
199 for (i = 0; i < p->
size; i++) {
201 if (i != (p->
size - 1))
204 fprintf(DST,
" }\n");
207 for (i = p->
size - 1; i >= 0; i--) {
210 fprintf(DST,
" * %s + ", pname[p->
pos - 1]);
212 fprintf(DST,
" * %s^%d + ", pname[p->
pos - 1], i);
214 fprintf(DST,
" )\n");
217 for (i = 0; i < p->
size; i++) {
219 if (i != (p->
size - 1))
222 fprintf(DST,
" ]_%s", pname[p->
pos - 1]);
260 for (i = 0; i < p1->
size; i++)
282 for (i = 0; i < p->
size; i++)
288 for (i = 1; i <= (p->
size) / 2; i++) {
289 if ((p->
size % i) == 0) {
292 for (j = 0; j < i; j++)
293 for (k = j + i; k < e->
x.p->size; k += i)
298 for (j = i; j < p->
size; j++)
317 for (i = p->
size - 1; i >= 1; i--) {
351 fprintf(stderr,
"emul: ?expecting constant value\n");
370 for (i = 0; i < p->
size; i++) {
371 emul(&p->
arr[i], e2, &(res->
x.p->arr[i]));
414 eadd(e1, &res->
x.p->arr[0]);
422 for (i = 0; i < res->
x.p->size; i++) {
423 eadd(e1, &res->
x.p->arr[i]);
430 fprintf(stderr,
"eadd: cannot add const with vector\n");
437 fprintf(stderr,
"eadd: cannot add evalue to const\n");
443 if ((e1->
x.p->type != res->
x.p->type) || (e1->
x.p->pos != res->
x.p->pos)) {
444 fprintf(stderr,
"eadd: ?cannot add, incompatible types\n");
450 if (e1->
x.p->size == res->
x.p->size) {
451 for (i = 0; i < res->
x.p->size; i++) {
452 eadd(&e1->
x.p->arr[i], &res->
x.p->arr[i]);
467 if (e1->
x.p->size > res->
x.p->size) {
470 for (i = 0; i < res->
x.p->size; ++i) {
471 eadd(&res->
x.p->arr[i], &tmp->
arr[i]);
476 for (i = 0; i < e1->
x.p->size; i++) {
477 eadd(&e1->
x.p->arr[i], &res->
x.p->arr[i]);
485 fprintf(stderr,
"eadd: ?addition of different sized periodic nos\n");
491 fprintf(stderr,
"eadd: ?cannot add vectors of different length\n");
520 fprintf(stderr,
"edot: ?expecting vectors\n");
524 fprintf(stderr,
"edot: ? vector lengths do not agree\n");
537 for (i = 1; i < v1->
size; i++) {
568 for (i = 0; i < p->
size; i++)
572 p->
pos = ref[p->
pos - 1] + 1;
589 ref = (
int *)malloc(
sizeof(
int) * (CT->
NbRows - 1));
590 for (i = 0; i < CT->
NbRows - 1; i++)
640 fprintf(stderr,
"Entering Cherche min --> \n");
641 fprintf(stderr,
"LowerUpperBounds :\n");
642 fprintf(stderr,
"pos = %d\n", pos);
643 fprintf(stderr,
"current min = (");
648 fprintf(stderr,
", ");
652 fprintf(stderr,
")\n");
658 fprintf(stderr,
"flag = %d\n", flag);
659 fprintf(stderr,
"binf = ");
661 fprintf(stderr,
"\n");
662 fprintf(stderr,
"bsup = ");
664 fprintf(stderr,
"\n");
745 if (MAXRAYS < 2 * D->NbConstraints)
755 fprintf(stderr,
"M for PreProcess : ");
757 fprintf(stderr,
"\nsize == ");
758 for (i = 0; i < d; i++)
760 fprintf(stderr,
"\n");
766 fprintf(stderr,
"Polyhedron_Preprocess: ");
768 "an equality was found where I did expect an inequality.\n");
769 fprintf(stderr,
"Trying to continue...\n");
773 for (j = 1; j <= d; j++)
784 fprintf(stderr,
"M used to find min : ");
805 for (i = 0; i <= (d + 1); i++) {
807 fprintf(stderr,
" ,");
809 fprintf(stderr,
"\n");
811 fprintf(stderr,
"\n");
815 for (i = 0; i <= (d + 1); i++)
822 fprintf(stderr,
"min->p = ( ");
824 for (i = 2; i <= d; i++) {
825 fprintf(stderr,
", ");
828 fprintf(stderr,
")\n");
833 for (i = 0; i < d; i++) {
837 for (j = 1; j <= d; j++)
844 for (j = 1; j <= d; j++)
852 fprintf(stderr,
"PolyhedronPreprocess: constraints H = ");
860 fprintf(stderr,
"\n");
904 fprintf(stderr,
"\nPreProcess2 : starting\n");
905 fprintf(stderr,
"lcm = ");
908 fprintf(stderr,
", size = ");
911 fprintf(stderr,
"\n");
921 for (r = 1; r < D->
NbRays; r++) {
941 for (r = 1; r < D->
NbRays; r++) {
962 fprintf(stderr,
"size on dimension %d\n", i);
963 fprintf(stderr,
"lcm = ");
966 fprintf(stderr,
", size = ");
969 fprintf(stderr,
"\n");
970 fprintf(stderr,
"required size (s) = ");
972 fprintf(stderr,
"\n");
996 fprintf(stderr,
"new size = ");
999 fprintf(stderr,
", new lcm = ");
1002 fprintf(stderr,
"\n");
1008 fprintf(stderr,
"Failed on dimension %d.\n", i);
1028 fprintf(stderr,
"PreProcess2 : c =");
1056 Value a, a1, b, b1, g, aa;
1057 Value abs_a, abs_b, size_copy;
1058 int dim, con, newi, needed;
1079 for (p = 1; p <= dim; p++) {
1080 for (ub = 0; ub < con; ub++) {
1084 for (lb = 0; lb < con; lb++) {
1093 for (p1 = 1; p1 < p; p1++) {
1166 fprintf(stderr,
"count_points: ? infinite domain\n");
1177 fprintf(stderr,
"(");
1178 for (i = 1; i < pos; i++) {
1180 fprintf(stderr,
",");
1183 fprintf(stderr,
")\n");
1231 fprintf(stderr,
"%d\n", CNT);
1255 int nb_param,
int dim,
Value *lcm,
1256 char **param_name) {
1258 int hdim, i, j, rank, flag;
1259 Value n, g, nLB, nUB, nlcm, noff, nexp, k1, nm, hdv, k, lcm_copy;
1264 fprintf(stderr,
"-------------------- begin P_Enum -------------------\n");
1265 fprintf(stderr,
"Calling P_Enum with pos = %d\n", pos);
1288 hdim = dim - nb_param + 1;
1329 fprintf(stderr,
"*************** n **********\n");
1331 fprintf(stderr,
"\n");
1339 fprintf(stderr,
"\n*************** n ************\n");
1359 fprintf(stderr,
"\n*************** n ************\n");
1367 fprintf(stdout,
"Parameter #%d: LB=", pos);
1369 fprintf(stdout,
" UB=");
1371 fprintf(stdout,
" lcm=");
1373 fprintf(stdout,
" degree reduced to %d\n", hdim - 1);
1382 for (i = 0; i < hdim; i++) {
1394 for (j = 0; j < hdim; ++j)
1419 fprintf(stderr,
"Finding ");
1421 fprintf(stderr,
"-th elements of periodic coefficients\n");
1435#ifdef ALL_OVERFLOW_WARNINGS
1437 fprintf(stdout,
"Domain Overflow: Parameter #%d:", pos);
1438 fprintf(stdout,
"nLB=");
1440 fprintf(stdout,
" n=");
1442 fprintf(stdout,
" nUB=");
1444 fprintf(stdout,
"\n");
1449 fprintf(stdout,
"\nWARNING: Parameter Domain Overflow.");
1450 fprintf(stdout,
" Result may be incorrect on this domain.\n");
1460 fprintf(stderr,
"%s = ", param_name[pos - 1]);
1462 fprintf(stderr,
" (hdim=%d, lcm[%d]=", hdim, pos - 1);
1464 fprintf(stderr,
")\n");
1466 fprintf(stderr,
"P%d = ", pos);
1468 fprintf(stderr,
" (hdim=%d, lcm[%d]=", hdim, pos - 1);
1470 fprintf(stderr,
")\n");
1475 if (pos == nb_param) {
1478 fprintf(stderr,
"Yes\n");
1488 for (j = 1; j < pos; j++)
1490 fprintf(stdout,
"E(");
1491 for (j = 1; j < nb_param; j++) {
1493 fprintf(stdout,
",");
1496 fprintf(stdout,
") = ");
1498 fprintf(stdout,
" =");
1506 B->
arr[i].
x.p =
P_Enum(L, LQ->
next, context, pos + 1, nb_param, dim,
1511 for (j = 1; j < pos; j++)
1513 fprintf(stdout,
"E(");
1514 for (j = 1; j <= pos; j++) {
1516 fprintf(stdout,
",");
1518 for (j = pos + 1; j < nb_param; j++)
1519 fprintf(stdout,
"%s,", param_name[j]);
1520 fprintf(stdout,
"%s) = ", param_name[j]);
1522 fprintf(stdout,
" =");
1532 for (j = 1; j <= hdim; j++) {
1537 fprintf(stdout,
" + ");
1539 fprintf(stdout,
" c%d", j);
1545 fprintf(stdout,
"\n");
1553 fprintf(stderr,
"P_Enum: ?expecting i==hdim\n");
1557 fprintf(stderr,
"B (enode) =\n");
1560 fprintf(stderr,
"A (Before Gauss) =\n");
1565 rank =
Gauss(A, hdim, 2 * hdim);
1568 fprintf(stderr,
"A (After Gauss) =\n");
1574 fprintf(stderr,
"P_Enum: ?expecting rank==hdim\n");
1585 for (i = 0; i < rank; i++) {
1588 for (j = 0; j < rank; j++) {
1589 value_gcd(g, A->
p[i][i + 1], A->
p[i][j + 1 + hdim]);
1598 fprintf(stderr,
"C (enode) =\n");
1608 fprintf(stderr,
"B.C (evalue)=\n");
1611 fprintf(stderr,
"\n");
1615 for (j = 0; j < rank; ++j)
1621 for (i = 0; i < hdim; ++i) {
1630 fprintf(stderr,
"res (enode) =\n");
1633 fprintf(stderr,
"-------------------- end P_Enum -----------------------\n");
1671 Value *lcm,
int nbp,
char **param_name) {
1673 int i, j, ix, l, np;
1683 for (np = 0; np < nbp; np++)
1687 fprintf(stdout,
"Vertices:\n");
1689 for (i = 0, ix = 0, bx =
MSB, V = PP->
V; V && i < PP->nbV; i++, V = V->
next) {
1690 if (Q->
F[ix] & bx) {
1699 fprintf(stdout,
"\n");
1743 char **param_name) {
1761 fprintf(stderr,
"L = \n");
1776 fprintf(stdout,
"---------------------------------------\n");
1777 fprintf(stdout,
"Domain:\n");
1781 printf(
"Vertices:\n");
1782 for (r = 0; r < P->
NbRays; ++r) {
1813 fprintf(stderr,
"Enumerate: arithmetic overflow error.\n");
1814 fprintf(stderr,
"You should rebuild PolyLib using GNU-MP"
1815 " or increasing the size of integers.\n");
1838 fprintf(stdout,
"\nEhrhart Polynomial:\n");
1840 fprintf(stdout,
"\n");
1857 unsigned MAXRAYS,
char **param_name) {
1858 Polyhedron *L, *CQ, *CQ2, *LQ, *U, *CEq, *rVD, *P, *Ph = NULL;
1862 int hdim, dim, nb_param, np;
1863 Vector *lcm, *m1, *context;
1879 fprintf(stderr,
"C = \n");
1881 fprintf(stderr,
"P = \n");
1890 if (nb_param == 0) {
1894 if (nb_param == dim) {
1903 fprintf(stdout,
"---------------------------------------\n");
1904 fprintf(stdout,
"Domain:\n");
1906 fprintf(stdout,
"\nEhrhart Polynomial:\n");
1908 fprintf(stdout,
"\n");
1915 fprintf(stdout,
"\nEhrhart Polynomial:\nNULL\n");
1927 if (nb_param == 0) {
1940 for (Q = PP->
D; Q; Q = Q->
next) {
1949 if (!rVD ||
emptyQ(rVD) ||
1966 fprintf(stdout,
"---------------------------------------\n");
1967 fprintf(stdout,
"Domain:\n");
1969#ifdef EPRINT_ALL_VALIDITY_CONSTRAINTS
1987 fprintf(stderr,
"Denominator = ");
1988 for (np = 0; np < nb_param; np++)
1990 fprintf(stderr,
" and hdim == %d \n", hdim);
1994 fprintf(stderr,
"CQ = \n");
2002 for (np = 0; np < nb_param + 1; np++) {
2010 fprintf(stderr,
"m1->p == ");
2011 for (np = 0; np < nb_param; np++)
2013 fprintf(stderr,
"\n");
2017 fprintf(stderr,
"Enumerate: arithmetic overflow error.\n");
2024 fprintf(stderr,
"After preprocess, CQ2 = ");
2037 fprintf(stderr,
"Trying to call Polyhedron_Preprocess2 : CQ = \n");
2042 for (r = 0; r < CQ->
NbRays; r++) {
2058 fprintf(stderr,
"Homogenize.\n");
2066 for (np = 0; np < nb_param + 1; np++)
2071 if (!CQ2 ||
emptyQ(CQ2)) {
2073 fprintf(stderr,
"Degenerate.\n");
2075 fprintf(stdout,
"Degenerate Domain. Can not continue.\n");
2083 fprintf(stderr,
"CQ2 = \n");
2086 fprintf(stderr,
"CQ does not include CQ2 !\n");
2088 fprintf(stderr,
"CQ includes CQ2.\n");
2090 fprintf(stderr,
"CQ2 is *not* included in validity domain !\n");
2092 fprintf(stderr,
"CQ2 is included in validity domain.\n");
2109 fprintf(stderr,
"L = \n");
2111 fprintf(stderr,
"LQ = \n");
2115 fprintf(stdout,
"\nSystem of Equations:\n");
2127 fprintf(stderr,
"Enumerate: arithmetic overflow error.\n");
2128 fprintf(stderr,
"You should rebuild PolyLib using GNU-MP "
2129 "or increasing the size of integers.\n");
2134 res->
EP.
x.p =
P_Enum(L, LQ, context->
p, 1, nb_param + hom, dim + hom,
2135 lcm->
p, param_name);
2147 fprintf(stdout,
"\nEhrhart Polynomial (before simplification):\n");
2161 fprintf(stdout,
"\nEhrhart Polynomial:\n");
2163 fprintf(stdout,
"\n");
2224 for (i = 0; i < e->
x.p->size; i++) {
2256 char **param_name) {
2257 Polyhedron *L, *CQ, *CQ2, *LQ, *U, *CEq, *rVD, *P;
2261 int i, hdim, dim, nb_param, np;
2262 Vector *lcm, *m1, *context;
2265 Value expansion_det;
2272 fprintf(stderr,
"C = \n");
2274 fprintf(stderr,
"P = \n");
2283 if (nb_param == 0) {
2289 printf(
"Enumerating polyhedron : \n");
2296 fprintf(stdout,
"\nEhrhart Polynomial:\nNULL\n");
2308 if (nb_param == 0) {
2347 for (i = 0; i < nb_param; i++)
2350 for (Q = PP->
D; Q; Q = Q->
next) {
2358 if (!rVD ||
emptyQ(rVD) ||
2374 fprintf(stdout,
"---------------------------------------\n");
2375 fprintf(stdout,
"Domain:\n");
2377#ifdef EPRINT_ALL_VALIDITY_CONSTRAINTS
2392 fprintf(stderr,
"Denominator = ");
2393 for (np = 0; np < nb_param; np++)
2395 fprintf(stderr,
" and hdim == %d \n", hdim);
2399 fprintf(stderr,
"CQ = \n");
2407 for (np = 0; np < nb_param; np++) {
2415 fprintf(stderr,
"m1->p == ");
2416 for (np = 0; np < nb_param; np++)
2418 fprintf(stderr,
"\n");
2422 fprintf(stderr,
"Enumerate: arithmetic overflow error.\n");
2429 fprintf(stderr,
"After preprocess, CQ2 = ");
2442 fprintf(stderr,
"Trying to call Polyhedron_Preprocess2 : CQ = \n");
2447 for (r = 0; r < CQ->
NbRays; r++) {
2459 if (!CQ2 ||
emptyQ(CQ2)) {
2461 fprintf(stderr,
"Degenerate.\n");
2463 fprintf(stdout,
"Degenerate Domain. Can not continue.\n");
2471 fprintf(stderr,
"CQ2 = \n");
2474 fprintf(stderr,
"CQ does not include CQ2 !\n");
2476 fprintf(stderr,
"CQ includes CQ2.\n");
2478 fprintf(stderr,
"CQ2 is *not* included in validity domain !\n");
2480 fprintf(stderr,
"CQ2 is included in validity domain.\n");
2497 fprintf(stderr,
"L = \n");
2499 fprintf(stderr,
"LQ = \n");
2503 fprintf(stdout,
"\nSystem of Equations:\n");
2515 fprintf(stderr,
"Enumerate: arithmetic overflow error.\n");
2516 fprintf(stderr,
"You should rebuild PolyLib using GNU-MP "
2517 "or increasing the size of integers.\n");
2522 res->
EP.
x.p =
P_Enum(L, LQ, context->
p, 1, nb_param, dim, lcm->
p, param_name);
2532 fprintf(stdout,
"\nEhrhart Polynomial (before simplification):\n");
2537 fprintf(stdout,
"\nEhrhart Polynomial (before division):\n");
2552 fprintf(stdout,
"\nEhrhart Polynomial:\n");
2554 fprintf(stdout,
"\n");
2565 for (np = 0; np < nb_param; np++) {
2627 Matrix **validityLattice,
2629 unsigned int **elimParms,
2656 unsigned int const *elimParms,
2657 unsigned int nbParms) {
2659 int newParmNb = nbParms - elimParms[0];
2660 char **newParmNames = malloc(newParmNb *
sizeof(
char *));
2661 for (k = 1; k <= elimParms[0]; k++) {
2662 while (i != elimParms[k]) {
2663 newParmNames[i - k + 1] = parmNames[i];
2667 return newParmNames;
Matrix * Matrix_Copy(Matrix const *Src)
#define value_oppose(ref, val)
#define value_sub_int(ref, val, vint)
#define VALUE_TO_INT(val)
#define value_notzero_p(val)
#define value_divexact(ref, val1, val2)
#define value_gcd(ref, val1, val2)
#define value_notone_p(val)
#define value_negz_p(val)
#define value_absolute(ref, val)
#define value_add_int(ref, val, vint)
#define value_decrement(ref, val)
#define value_zero_p(val)
#define value_assign(v1, v2)
#define value_increment(ref, val)
#define value_set_si(val, i)
#define value_addmul(ref, val1, val2)
#define value_notmone_p(val)
#define value_division(ref, val1, val2)
#define value_multiply(ref, val1, val2)
#define value_print(Dst, fmt, val)
#define value_modulus(ref, val1, val2)
#define value_subtract(ref, val1, val2)
#define value_addto(ref, val1, val2)
#define value_posz_p(val)
Matrix * Constraints_Remove_parm_eqs(Matrix **M1, Matrix **Ctxt1, int renderSpace, unsigned int **elimParms)
Removes the equalities that involve only parameters, by eliminating some parameters in the polyhedron...
Matrix * full_dimensionize(Matrix const *M, int nbParms, Matrix **validityLattice)
Given a matrix with m parameterized equations, compress the nb_parms parameters and n-m variables so ...
static int eequal(evalue *e1, evalue *e2)
Enumeration * Ehrhart_Quick_Apx_Full_Dim(Polyhedron *Pi, Polyhedron *C, unsigned MAXRAYS, char **param_name)
Ehrhart_Quick_Apx_Full_Dim(P, C, MAXRAYS, param_names)
char ** parmsWithoutElim(char **parmNames, unsigned int const *elimParms, unsigned int nbParms)
Returns the array of parameter names after some of them have been eliminated.
Enumeration * Constraints_EhrhartQuickApx(Matrix const *M, Matrix const *C, Matrix **validityLattice, Matrix **parmEqualities, unsigned int **elimParms, unsigned maxRays)
Computes the approximation of the Ehrhart polynomial of a polyhedron (implicit form -> matrix),...
Polyhedron * old_Polyhedron_Preprocess(Polyhedron *D, Value size, unsigned MAXRAYS)
This procedure adds additional constraints to D so that as each parameter is scanned,...
void edot(enode *v1, enode *v2, evalue *res)
computes the inner product of two vectors.
void evalue_div(evalue *e, Value n)
Divides the evalue e by the integer n recursive function Warning : modifies e.
void print_evalue(FILE *DST, evalue *e, char **pname)
Enumeration * Enumeration_zero(unsigned int nbParms, unsigned int maxRays)
returns a constant Ehrhart polynomial whose value is zero for any value of the parameters.
static void emul(evalue *e1, evalue *e2, evalue *res)
multiplies two evalues and puts the result in res
Enumeration * Polyhedron_Enumerate(Polyhedron *Pi, Polyhedron *C, unsigned MAXRAYS, char **param_name)
Procedure to count points in a parameterized polytope.
enode * new_enode(enode_type type, int size, int pos)
EHRHART POLYNOMIAL SYMBOLIC ALGEBRA SYSTEM.
void eadd(evalue *e1, evalue *res)
adds one evalue to evalue 'res.
int cherche_min(Value *min, Polyhedron *D, int pos)
static void aep_evalue(evalue *e, int *ref)
local recursive function used in the following ref contains the new position for each old index posit...
Polyhedron * Polyhedron_Preprocess(Polyhedron *D, Value *size, unsigned MAXRAYS)
This procedure finds the smallest parallelepiped of size 'size[i]' for every dimension i,...
void free_evalue_refs(evalue *e)
releases all memory referenced by e.
Polyhedron * Polyhedron_Preprocess2(Polyhedron *D, Value *size, Value *lcm, unsigned MAXRAYS)
This procedure finds an hypercube of size 'size', containing polyhedron D increases size and lcm if n...
#define MAXITER
This procedure finds an integer point contained in polyhedron D / first checks for positive values,...
static void addeliminatedparams_evalue(evalue *e, Matrix *CT)
Comments.
static void Scan_Vertices(Param_Polyhedron *PP, Param_Domain *Q, Matrix *CT, Value *lcm, int nbp, char **param_name)
int overflow_warning_flag
void print_enode(FILE *DST, enode *p, char **pname)
prints the enode to DST
static enode * P_Enum(Polyhedron *L, Polyhedron *LQ, Value *context, int pos, int nb_param, int dim, Value *lcm, char **param_name)
void count_points(int pos, Polyhedron *P, Value *context, Value *res)
PROCEDURES TO COMPUTE ENUMERATION.
void reduce_evalue(evalue *e)
Enumeration * Enumerate_NoParameters(Polyhedron *P, Polyhedron *C, Matrix *CT, Polyhedron *CEq, unsigned MAXRAYS, char **param_name)
Procedure to count points in a non-parameterized polytope.
void Enumeration_Free(Enumeration *en)
Enumeration * Ehrhart_Quick_Apx(Matrix *M, Matrix *C, Matrix **Validity_Lattice, unsigned maxRays)
Computes the approximation of the Ehrhart polynomial of a polyhedron (implicit form -> matrix),...
unsigned int overflow_error
Polyhedron * homogenize(Polyhedron *P, unsigned MAXRAYS)
homogenization.h – Bavo Nootaert
void dehomogenize_evalue(evalue *ep, int nb_param)
dehomogenize an evalue.
Matrix * Matrix_Alloc(unsigned NbRows, unsigned NbColumns)
void Matrix_Print(FILE *Dst, const char *Format, Matrix *Mat)
void Matrix_Free(Matrix *Mat)
void mpolyhedron_compress_last_vars(Matrix *M, Matrix *compression)
compress the last vars/pars of the polyhedron M expressed as a polylib matrix
#define show_matrix(M)
Polylib matrix addons Mainly, deals with polyhedra represented in implicit form (set of constraints).
int PolyhedronIncludes(Polyhedron *Pol1, Polyhedron *Pol2)
void Polyhedron_Free(Polyhedron *Pol)
int Gauss(Matrix *Mat, int NbEq, int Dimension)
Polyhedron * Polyhedron_Scan(Polyhedron *D, Polyhedron *C, unsigned NbMaxRays)
Polyhedron * Polyhedron_Preimage(Polyhedron *Pol, Matrix *Func, unsigned NbMaxRays)
Polyhedron * DomainIntersection(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Polyhedron * DomainSimplify(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Polyhedron * Universe_Polyhedron(unsigned Dimension)
int lower_upper_bounds(int pos, Polyhedron *P, Value *context, Value *LBp, Value *UBp)
Polyhedron * Constraints2Polyhedron(Matrix *Constraints, unsigned NbMaxRays)
Given a matrix of constraints ('Constraints'), construct and return a polyhedron.
Polyhedron * AddConstraints(Value *Con, unsigned NbConstraints, Polyhedron *Pol, unsigned NbMaxRays)
void Polyhedron_Print(FILE *Dst, const char *Format, const Polyhedron *Pol)
void Domain_Free(Polyhedron *Pol)
#define POL_ENSURE_VERTICES(P)
#define POL_ENSURE_FACETS(P)
void Param_Vertices_Free(Param_Vertices *PV)
void Param_Polyhedron_Free(Param_Polyhedron *P)
void Print_Vertex(FILE *DST, Matrix *V, char **param_names)
void Param_Polyhedron_Scale_Integer(Param_Polyhedron *PP, Polyhedron **P, Value *det, unsigned MaxRays)
void Print_Domain(FILE *DST, Polyhedron *D, char **pname)
Matrix * VertexCT(Matrix *V, Matrix *CT)
Param_Polyhedron * Polyhedron2Param_SimplifiedDomain(Polyhedron **Din, Polyhedron *Cin, int working_space, Polyhedron **CEq, Matrix **CT)
struct _Param_Domain * next
struct _Param_Vertex * next
Polyhedron * ValidityDomain
struct _enumeration * next
#define POL_ISSET(flags, f)
void Vector_Free(Vector *vector)
void Vector_Set(Value *p, int n, unsigned length)
void Vector_Combine(Value *p1, Value *p2, Value *p3, Value lambda, Value mu, unsigned length)
void Vector_Normalize(Value *p, unsigned length)
Vector * Vector_Alloc(unsigned length)
void Vector_Copy(Value *p1, Value *p2, unsigned length)