5#define POL_ENSURE_INEQUALITIES(P) \
6 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_INEQUALITIES)) \
7 Polyhedron_Compute_Dual(P);
9#define POL_ENSURE_POINTS(P) \
10 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_POINTS)) \
11 Polyhedron_Compute_Dual(P);
13#define POL_ENSURE_FACETS(P) \
14 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_FACETS)) \
15 Polyhedron_Compute_Dual(P);
17#define POL_ENSURE_VERTICES(P) \
18 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_VERTICES)) \
19 Polyhedron_Compute_Dual(P);
21#if defined(__cplusplus)
43 unsigned NbMaxConstrs);
49 unsigned NbMaxConstrs);
65extern int Gauss(
Matrix *Mat,
int NbEq,
int Dimension);
67 Value *LBp, Value *UBp);
76 unsigned NbMaxConstrs);
88 unsigned NbMaxRays,
int Pass);
92#if defined(__cplusplus)
void PolyPrint(Polyhedron *Pol)
int PolyhedronIncludes(Polyhedron *Pol1, Polyhedron *Pol2)
Polyhedron * DomainAddRays(Polyhedron *Pol, Matrix *Ray, unsigned NbMaxConstrs)
Add rays pointed by 'Ray' to each and every polyhedron in the polyhedral domain 'Pol'.
Polyhedron * align_context(Polyhedron *Pol, int align_dimension, int NbMaxRays)
void Domain_PrintConstraints(FILE *Dst, const char *Format, Polyhedron *Pol)
Polyhedron * Polyhedron_Image(Polyhedron *Pol, Matrix *Func, unsigned NbMaxConstrs)
void Polyhedron_PrintConstraints(FILE *Dst, const char *Format, Polyhedron *Pol)
Polyhedron * Stras_DomainSimplify(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Polyhedron * DomainAddConstraints(Polyhedron *Pol, Matrix *Mat, unsigned NbMaxRays)
void Polyhedron_Free(Polyhedron *Pol)
void Polyhedron_Compute_Dual(Polyhedron *P)
Polyhedron * DomainConvex(Polyhedron *Pol, unsigned NbMaxConstrs)
Polyhedron * Empty_Polyhedron(unsigned Dimension)
Polyhedron * DomainConstraintSimplify(Polyhedron *P, unsigned MaxRays)
void polylib_close(void)
Free all cache allocated memory: call this function before exiting in a memory checker environment li...
int Gauss(Matrix *Mat, int NbEq, int Dimension)
Polyhedron * DomainDifference(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Polyhedron * AddPolyToDomain(Polyhedron *Pol, Polyhedron *PolDomain)
Polyhedron * Polyhedron_Preimage(Polyhedron *Pol, Matrix *Func, unsigned NbMaxRays)
Polyhedron * DomainIntersection(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Return the intersection of two polyhedral domains 'Pol1' and 'Pol2'.
Interval * DomainCost(Polyhedron *Pol, Value *Cost)
Polyhedron * Polyhedron_Copy(Polyhedron *Pol)
Polyhedron * Domain_Copy(Polyhedron *Pol)
Polyhedron * DomainPreimage(Polyhedron *Pol, Matrix *Func, unsigned NbMaxRays)
Polyhedron * DomainSimplify(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
Polyhedron * Universe_Polyhedron(unsigned Dimension)
Polyhedron * Rays2Polyhedron(Matrix *Ray, unsigned NbMaxConstrs)
Given a matrix of rays 'Ray', create and return a polyhedron.
Polyhedron * DomainUnion(Polyhedron *Pol1, Polyhedron *Pol2, unsigned NbMaxRays)
int lower_upper_bounds(int pos, Polyhedron *P, Value *context, Value *LBp, Value *UBp)
Polyhedron * Polyhedron_Scan(Polyhedron *D, Polyhedron *C, unsigned MAXRAYS)
Matrix * Polyhedron2Constraints(Polyhedron *Pol)
Polyhedron * DomainImage(Polyhedron *Pol, Matrix *Func, unsigned NbMaxConstrs)
Polyhedron * Disjoint_Domain(Polyhedron *Pol, int flag, unsigned NbMaxRays)
Polyhedron * Polyhedron_Alloc(unsigned Dimension, unsigned NbConstraints, unsigned NbRays)
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)
Polyhedron * AddRays(Value *Ray2, unsigned NbRay2, Polyhedron *Pol1, unsigned NbMaxRays)
Add 'NbAddedRays' rays to polyhedron 'Pol'.
Polyhedron * SubConstraint(Value *Con, Polyhedron *Pol, unsigned NbMaxRays, int Pass)
Matrix * Polyhedron2Rays(Polyhedron *Pol)
Given a polyhedron 'Pol', return a matrix of rays.