00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef PPL_Poly_Con_Relation_defs_hh
00025 #define PPL_Poly_Con_Relation_defs_hh 1
00026
00027 #include "Poly_Con_Relation.types.hh"
00028 #include "globals.defs.hh"
00029 #include <iosfwd>
00030
00031 namespace Parma_Polyhedra_Library {
00032
00033
00034
00036
00037 bool operator==(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00038
00040
00041 bool operator!=(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00042
00044
00045 Poly_Con_Relation operator&&(const Poly_Con_Relation& x,
00046 const Poly_Con_Relation& y);
00047
00054 Poly_Con_Relation operator-(const Poly_Con_Relation& x,
00055 const Poly_Con_Relation& y);
00056
00057 namespace IO_Operators {
00058
00060
00061 std::ostream& operator<<(std::ostream& s, const Poly_Con_Relation& r);
00062
00063 }
00064
00065 }
00066
00067
00069
00073 class Parma_Polyhedra_Library::Poly_Con_Relation {
00074 private:
00076 typedef unsigned int flags_t;
00077
00079
00080 static const flags_t NOTHING = 0U;
00081 static const flags_t IS_DISJOINT = 1U << 0;
00082 static const flags_t STRICTLY_INTERSECTS = 1U << 1;
00083 static const flags_t IS_INCLUDED = 1U << 2;
00084 static const flags_t SATURATES = 1U << 3;
00086
00088 static const flags_t EVERYTHING
00089 = IS_DISJOINT
00090 | STRICTLY_INTERSECTS
00091 | IS_INCLUDED
00092 | SATURATES;
00093
00095 flags_t flags;
00096
00098 static bool implies(flags_t x, flags_t y);
00099
00101 Poly_Con_Relation(flags_t mask);
00102
00103 friend bool
00104 operator==(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00105 friend bool
00106 operator!=(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00107
00108 friend Poly_Con_Relation
00109 operator&&(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00110
00111 friend Poly_Con_Relation
00112 operator-(const Poly_Con_Relation& x, const Poly_Con_Relation& y);
00113
00114 friend std::ostream&
00115 Parma_Polyhedra_Library::
00116 IO_Operators::operator<<(std::ostream& s, const Poly_Con_Relation& r);
00117
00118 public:
00119 #ifdef PPL_DOXYGEN_INCLUDE_IMPLEMENTATION_DETAILS
00120
00124 #endif
00125 flags_t get_flags() const;
00126
00127 public:
00129 static Poly_Con_Relation nothing();
00130
00135 static Poly_Con_Relation is_disjoint();
00136
00141 static Poly_Con_Relation strictly_intersects();
00142
00147 static Poly_Con_Relation is_included();
00148
00153 static Poly_Con_Relation saturates();
00154
00155 PPL_OUTPUT_DECLARATIONS
00156
00158 bool implies(const Poly_Con_Relation& y) const;
00159
00161 bool OK() const;
00162 };
00163
00164 #include "Poly_Con_Relation.inlines.hh"
00165
00166 #endif // !defined(PPL_Poly_Con_Relation_defs_hh)