00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _polyhedron_H_
00019 #define _polyhedron_H_
00020
00021
00022 #define POL_ENSURE_INEQUALITIES(P) \
00023 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_INEQUALITIES)) \
00024 Polyhedron_Compute_Dual(P);
00025
00026 #define POL_ENSURE_POINTS(P) \
00027 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_POINTS)) \
00028 Polyhedron_Compute_Dual(P);
00029
00030 #define POL_ENSURE_FACETS(P) \
00031 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_FACETS)) \
00032 Polyhedron_Compute_Dual(P);
00033
00034 #define POL_ENSURE_VERTICES(P) \
00035 if (F_ISSET(P, POL_VALID) && !F_ISSET(P, POL_VERTICES)) \
00036 Polyhedron_Compute_Dual(P);
00037
00038 #if defined(__cplusplus)
00039 extern "C" {
00040 #endif
00041
00042 extern void Polyhedron_Compute_Dual(Polyhedron *P);
00043
00044 Polyhedron *DomainConstraintSimplify(Polyhedron *P, unsigned MaxRays);
00045
00046 extern Polyhedron *AddConstraints(Value *Con,unsigned NbConstraints,
00047 Polyhedron *Pol,unsigned NbMaxRays );
00048 extern Polyhedron *AddPolyToDomain(Polyhedron *Pol,Polyhedron *PolDomain);
00049 extern Polyhedron *AddRays (Value *Ray2,unsigned NbRay2,Polyhedron
00050 *Pol1,unsigned NbMaxRays);
00051 extern Polyhedron *align_context(Polyhedron *Pol,int align_dimension,
00052 int NbMaxRays);
00053 extern Polyhedron *Constraints2Polyhedron(Matrix *Constraints, unsigned
00054 NbMaxRays);
00055 extern Polyhedron *Disjoint_Domain( Polyhedron *Pol, int flag, unsigned
00056 NbMaxRays );
00057 extern Polyhedron *DomainAddConstraints(Polyhedron *Pol,Matrix *Mat,
00058 unsigned NbMaxRays);
00059 extern Polyhedron *DomainAddRays(Polyhedron *Pol,Matrix *Ray,
00060 unsigned NbMaxConstrs);
00061 extern Polyhedron *DomainConvex(Polyhedron *Pol,unsigned NbMaxConstrs);
00062 extern Interval *DomainCost(Polyhedron *Pol,Value *Cost);
00063 extern Polyhedron *DomainDifference(Polyhedron *Pol1,Polyhedron *Pol2,
00064 unsigned NbMaxRays);
00065 extern Polyhedron *DomainImage(Polyhedron *Pol,Matrix *Func,unsigned
00066 NbMaxConstrs);
00067 extern Polyhedron *DomainIntersection(Polyhedron *Pol1,Polyhedron
00068 *Pol2, unsigned NbMaxRays);
00069 extern Polyhedron *DomainPreimage(Polyhedron *Pol,Matrix *Func,
00070 unsigned NbMaxRays);
00071 extern Polyhedron *DomainSimplify(Polyhedron *Pol1, Polyhedron *Pol2,
00072 unsigned NbMaxRays);
00073 extern Polyhedron *Stras_DomainSimplify(Polyhedron *Pol1, Polyhedron *Pol2,
00074 unsigned NbMaxRays);
00075 extern Polyhedron *DomainUnion(Polyhedron *Pol1,Polyhedron *Pol2,
00076 unsigned NbMaxRays);
00077 extern Polyhedron *Domain_Copy(Polyhedron *Pol);
00078 extern void Domain_Free (Polyhedron *Pol);
00079 extern void Domain_PrintConstraints(FILE *Dst, const char *Format,
00080 Polyhedron *Pol);
00081 extern Polyhedron *Empty_Polyhedron(unsigned Dimension);
00082 extern int Gauss(Matrix *Mat,int NbEq,int Dimension);
00083 extern int lower_upper_bounds(int pos,Polyhedron *P,Value *context,
00084 Value *LBp,Value *UBp);
00085 extern Matrix *Polyhedron2Constraints(Polyhedron *Pol);
00086 extern Matrix *Polyhedron2Rays(Polyhedron *Pol);
00087 extern int PolyhedronIncludes(Polyhedron *Pol1,Polyhedron *Pol2);
00088 extern Polyhedron* Polyhedron_Alloc(unsigned Dimension,unsigned
00089 NbConstraints,unsigned NbRays);
00090 extern Polyhedron *Polyhedron_Copy(Polyhedron *Pol);
00091 extern void Polyhedron_Free(Polyhedron *Pol);
00092 extern Polyhedron *Polyhedron_Image(Polyhedron *Pol,Matrix *Func,
00093 unsigned NbMaxConstrs);
00094 extern Polyhedron *Polyhedron_Preimage(Polyhedron *Pol,Matrix *Func,
00095 unsigned NbMaxRays);
00096 extern void Polyhedron_Print(FILE *Dst, const char *Format, const Polyhedron *Pol);
00097 extern void Polyhedron_PrintConstraints(FILE *Dst, const char *Format,
00098 Polyhedron *Pol);
00099 extern Polyhedron *Polyhedron_Scan(Polyhedron *D,Polyhedron *C,
00100 unsigned MAXRAYS);
00101 extern void PolyPrint(Polyhedron *Pol);
00102 extern Polyhedron *Rays2Polyhedron(Matrix *Ray,unsigned NbMaxConstrs);
00103 extern Polyhedron *SubConstraint(Value *Con,Polyhedron *Pol,
00104 unsigned NbMaxRays, int Pass);
00105 extern Polyhedron *Universe_Polyhedron (unsigned Dimension);
00106
00107 #if defined(__cplusplus)
00108 }
00109 #endif
00110
00111 #endif