#include <Poly_Gen_Relation.defs.hh>
Public Member Functions | |
flags_t | get_flags () const |
Access the internal flags: this is needed for some foreign language interfaces. | |
void | ascii_dump () const |
Writes to std::cerr an ASCII representation of *this . | |
void | ascii_dump (std::ostream &s) const |
Writes to s an ASCII representation of *this . | |
void | print () const |
Prints *this to std::cerr using operator<< . | |
bool | implies (const Poly_Gen_Relation &y) const |
True if and only if *this implies y . | |
bool | OK () const |
Checks if all the invariants are satisfied. | |
Static Public Member Functions | |
static Poly_Gen_Relation | nothing () |
The assertion that says nothing. | |
static Poly_Gen_Relation | subsumes () |
Adding the generator would not change the polyhedron. | |
Private Types | |
typedef unsigned int | flags_t |
Poly_Gen_Relation is implemented by means of a finite bitset. | |
Private Member Functions | |
Poly_Gen_Relation (flags_t mask) | |
Construct from a bit-mask. | |
Static Private Member Functions | |
static bool | implies (flags_t x, flags_t y) |
True if and only if the conjunction x implies the conjunction y . | |
Private Attributes | |
flags_t | flags |
This holds the current bitset. | |
Static Private Attributes | |
static const flags_t | EVERYTHING = SUBSUMES |
All assertions together. | |
Bit-masks for the individual assertions | |
static const flags_t | NOTHING = 0U |
static const flags_t | SUBSUMES = 1U << 0 |
Friends | |
bool | operator== (const Poly_Gen_Relation &x, const Poly_Gen_Relation &y) |
True if and only if x and y are logically equivalent. | |
bool | operator!= (const Poly_Gen_Relation &x, const Poly_Gen_Relation &y) |
True if and only if x and y are not logically equivalent. | |
Poly_Gen_Relation | operator && (const Poly_Gen_Relation &x, const Poly_Gen_Relation &y) |
Yields the logical conjunction of x and y . | |
Poly_Gen_Relation | operator- (const Poly_Gen_Relation &x, const Poly_Gen_Relation &y) |
Yields the assertion with all the conjuncts of x that are not in y . | |
std::ostream & | operator<< (std::ostream &s, const Poly_Gen_Relation &r) |
Output operator. |
This class implements conjunctions of assertions on the relation between a polyhedron and a generator.
Definition at line 72 of file Poly_Gen_Relation.defs.hh.
typedef unsigned int Parma_Polyhedra_Library::Poly_Gen_Relation::flags_t [private] |
Poly_Gen_Relation is implemented by means of a finite bitset.
Definition at line 75 of file Poly_Gen_Relation.defs.hh.
Parma_Polyhedra_Library::Poly_Gen_Relation::Poly_Gen_Relation | ( | flags_t | mask | ) | [inline, private] |
Construct from a bit-mask.
Definition at line 29 of file Poly_Gen_Relation.inlines.hh.
Referenced by nothing(), and subsumes().
00030 : flags(mask) { 00031 }
bool Parma_Polyhedra_Library::Poly_Gen_Relation::implies | ( | flags_t | x, | |
flags_t | y | |||
) | [inline, static, private] |
True if and only if the conjunction x
implies the conjunction y
.
Definition at line 49 of file Poly_Gen_Relation.inlines.hh.
Referenced by ascii_dump(), implies(), and ppl_Polyhedron_relation_with_generator().
Poly_Gen_Relation::flags_t Parma_Polyhedra_Library::Poly_Gen_Relation::get_flags | ( | ) | const [inline] |
Access the internal flags: this is needed for some foreign language interfaces.
Definition at line 34 of file Poly_Gen_Relation.inlines.hh.
References flags.
00034 { 00035 return flags; 00036 }
Poly_Gen_Relation Parma_Polyhedra_Library::Poly_Gen_Relation::nothing | ( | ) | [inline, static] |
The assertion that says nothing.
Definition at line 39 of file Poly_Gen_Relation.inlines.hh.
References NOTHING, and Poly_Gen_Relation().
Referenced by Parma_Polyhedra_Library::Polyhedron::BHRZ03_evolving_points(), Parma_Polyhedra_Library::Polyhedron::BHRZ03_evolving_rays(), Parma_Polyhedra_Library::Polyhedron::relation_with(), Parma_Polyhedra_Library::Grid::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().
00039 { 00040 return Poly_Gen_Relation(NOTHING); 00041 }
Poly_Gen_Relation Parma_Polyhedra_Library::Poly_Gen_Relation::subsumes | ( | ) | [inline, static] |
Adding the generator would not change the polyhedron.
Definition at line 44 of file Poly_Gen_Relation.inlines.hh.
References Poly_Gen_Relation(), and SUBSUMES.
Referenced by Parma_Polyhedra_Library::Polyhedron::relation_with(), Parma_Polyhedra_Library::Grid::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().
00044 { 00045 return Poly_Gen_Relation(SUBSUMES); 00046 }
void Parma_Polyhedra_Library::Poly_Gen_Relation::ascii_dump | ( | ) | const |
Writes to std::cerr
an ASCII representation of *this
.
void Parma_Polyhedra_Library::Poly_Gen_Relation::ascii_dump | ( | std::ostream & | s | ) | const |
Writes to s
an ASCII representation of *this
.
Definition at line 34 of file Poly_Gen_Relation.cc.
References flags, implies(), NOTHING, and SUBSUMES.
00034 { 00035 flags_t f = flags; 00036 if (f == NOTHING) { 00037 s << "NOTHING"; 00038 return; 00039 } 00040 00041 while (true) { 00042 if (implies(f, SUBSUMES)) { 00043 s << "SUBSUMES"; 00044 f &= ~SUBSUMES; 00045 } 00046 if (f != NOTHING) 00047 s << " & "; 00048 else 00049 break; 00050 } 00051 }
void Parma_Polyhedra_Library::Poly_Gen_Relation::print | ( | ) | const |
Prints *this
to std::cerr
using operator<<
.
bool Parma_Polyhedra_Library::Poly_Gen_Relation::implies | ( | const Poly_Gen_Relation & | y | ) | const [inline] |
bool Parma_Polyhedra_Library::Poly_Gen_Relation::OK | ( | ) | const |
bool operator== | ( | const Poly_Gen_Relation & | x, | |
const Poly_Gen_Relation & | y | |||
) | [friend] |
True if and only if x
and y
are logically equivalent.
Definition at line 60 of file Poly_Gen_Relation.inlines.hh.
bool operator!= | ( | const Poly_Gen_Relation & | x, | |
const Poly_Gen_Relation & | y | |||
) | [friend] |
True if and only if x
and y
are not logically equivalent.
Definition at line 66 of file Poly_Gen_Relation.inlines.hh.
Poly_Gen_Relation operator && | ( | const Poly_Gen_Relation & | x, | |
const Poly_Gen_Relation & | y | |||
) | [friend] |
Yields the logical conjunction of x
and y
.
Definition at line 72 of file Poly_Gen_Relation.inlines.hh.
00072 { 00073 return Poly_Gen_Relation(x.flags | y.flags); 00074 }
Poly_Gen_Relation operator- | ( | const Poly_Gen_Relation & | x, | |
const Poly_Gen_Relation & | y | |||
) | [friend] |
Yields the assertion with all the conjuncts of x
that are not in y
.
Definition at line 78 of file Poly_Gen_Relation.inlines.hh.
00078 { 00079 return Poly_Gen_Relation(x.flags & ~y.flags); 00080 }
std::ostream & operator<< | ( | std::ostream & | s, | |
const Poly_Gen_Relation & | r | |||
) | [friend] |
const flags_t Parma_Polyhedra_Library::Poly_Gen_Relation::NOTHING = 0U [static, private] |
const flags_t Parma_Polyhedra_Library::Poly_Gen_Relation::SUBSUMES = 1U << 0 [static, private] |
Definition at line 80 of file Poly_Gen_Relation.defs.hh.
Referenced by ascii_dump(), and subsumes().
const flags_t Parma_Polyhedra_Library::Poly_Gen_Relation::EVERYTHING = SUBSUMES [static, private] |
This holds the current bitset.
Definition at line 88 of file Poly_Gen_Relation.defs.hh.
Referenced by ascii_dump(), get_flags(), and implies().