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