38 unsigned nb_vars = dim;
39 unsigned P_extra = P->
Dimension - nb_vars - nb_parms;
40 unsigned D_extra = D->
Dimension - nb_vars - nb_parms;
41 unsigned nb_new_parms;
43 Matrix *cur_element, *C_times_J, *Klon;
53 nb_new_parms = nb_vars;
57 printf(
"\nRanking > No variables, returning NULL.\n");
67 P->
Dimension + D_extra + nb_new_parms + 2);
70 P->
Dimension + D_extra + nb_new_parms + 2);
76 cur_element->
p[i] + 1 + nb_vars + P_extra + D_extra +
86 cur_element->
p[r] + 1 + nb_vars + P_extra + D_extra,
89 cur_element->
p[r] + 1 + nb_vars + P_extra, D_extra);
91 cur_element->
p[r] + 1 + nb_vars + P_extra + D_extra +
100 for (k = 0, r = ncons; k < nb_vars; k++, r++) {
105 cur_element->
NbRows = r + 1;
115 value_set_si(cur_element->
p[r][nb_vars + P_extra + D_extra + k + 1], 1);
128 P1->
next = lexico_lesser_union;
129 lexico_lesser_union = P1;
Matrix * Matrix_Copy(Matrix const *Src)
#define value_assign(v1, v2)
#define value_set_si(val, i)
Enumeration * Domain_Enumerate(Polyhedron *D, Polyhedron *C, unsigned MAXRAYS, const char **pn)
Matrix * Matrix_Alloc(unsigned NbRows, unsigned NbColumns)
void Matrix_Free(Matrix *Mat)
#define show_matrix(M)
Polylib matrix addons Mainly, deals with polyhedra represented in implicit form (set of constraints).
void Polyhedron_Free(Polyhedron *Pol)
Polyhedron * Constraints2Polyhedron(Matrix *Constraints, unsigned NbMaxRays)
Given a matrix of constraints ('Constraints'), construct and return a polyhedron.
void Domain_Free(Polyhedron *Pol)
#define POL_ENSURE_INEQUALITIES(P)
Polyhedron * LexSmaller(Polyhedron *P, Polyhedron *D, unsigned dim, Polyhedron *C, unsigned MAXRAYS)
Tools to compute the ranking function of an iteration J: the number of integer points in P that are l...
Enumeration * Polyhedron_Ranking(Polyhedron *P, Polyhedron *C, unsigned MAXRAYS)
Enumeration * Polyhedron_LexSmallerEnumerate(Polyhedron *P, Polyhedron *D, unsigned dim, Polyhedron *C, unsigned MAXRAYS)
Returns the number of points in P that are lexicographically smaller than a given point in D.
void Vector_Copy(Value *p1, Value *p2, unsigned length)