#include <Poly_Con_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_Con_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_Con_Relation | nothing () |
The assertion that says nothing. | |
static Poly_Con_Relation | is_disjoint () |
The polyhedron and the set of points satisfying the constraint are disjoint. | |
static Poly_Con_Relation | strictly_intersects () |
The polyhedron intersects the set of points satisfying the constraint, but it is not included in it. | |
static Poly_Con_Relation | is_included () |
The polyhedron is included in the set of points satisfying the constraint. | |
static Poly_Con_Relation | saturates () |
The polyhedron is included in the set of points saturating the constraint. | |
Private Types | |
typedef unsigned int | flags_t |
Poly_Con_Relation is implemented by means of a finite bitset. | |
Private Member Functions | |
Poly_Con_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 |
All assertions together. | |
Bit-masks for the individual assertions | |
static const flags_t | NOTHING = 0U |
static const flags_t | IS_DISJOINT = 1U << 0 |
static const flags_t | STRICTLY_INTERSECTS = 1U << 1 |
static const flags_t | IS_INCLUDED = 1U << 2 |
static const flags_t | SATURATES = 1U << 3 |
Friends | |
bool | operator== (const Poly_Con_Relation &x, const Poly_Con_Relation &y) |
True if and only if x and y are logically equivalent. | |
bool | operator!= (const Poly_Con_Relation &x, const Poly_Con_Relation &y) |
True if and only if x and y are not logically equivalent. | |
Poly_Con_Relation | operator && (const Poly_Con_Relation &x, const Poly_Con_Relation &y) |
Yields the logical conjunction of x and y . | |
Poly_Con_Relation | operator- (const Poly_Con_Relation &x, const Poly_Con_Relation &y) |
Yields the assertion with all the conjuncts of x that are not in y . | |
std::ostream & | operator<< (std::ostream &s, const Poly_Con_Relation &r) |
Output operator. |
This class implements conjunctions of assertions on the relation between a polyhedron and a constraint.
Definition at line 72 of file Poly_Con_Relation.defs.hh.
typedef unsigned int Parma_Polyhedra_Library::Poly_Con_Relation::flags_t [private] |
Poly_Con_Relation is implemented by means of a finite bitset.
Definition at line 75 of file Poly_Con_Relation.defs.hh.
Parma_Polyhedra_Library::Poly_Con_Relation::Poly_Con_Relation | ( | flags_t | mask | ) | [inline, private] |
Construct from a bit-mask.
Definition at line 29 of file Poly_Con_Relation.inlines.hh.
Referenced by is_disjoint(), is_included(), nothing(), saturates(), and strictly_intersects().
00030 : flags(mask) { 00031 }
bool Parma_Polyhedra_Library::Poly_Con_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 64 of file Poly_Con_Relation.inlines.hh.
Referenced by ascii_dump(), Parma_Polyhedra_Library::Octagonal_Shape< T >::difference_assign(), Parma_Polyhedra_Library::Grid::difference_assign(), Parma_Polyhedra_Library::BD_Shape< T >::difference_assign(), implies(), Parma_Polyhedra_Library::Polyhedron::poly_difference_assign(), Parma_Polyhedra_Library::Polyhedron::relation_with(), Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::relation_with(), and Parma_Polyhedra_Library::Generator_System::relation_with().
Poly_Con_Relation::flags_t Parma_Polyhedra_Library::Poly_Con_Relation::get_flags | ( | ) | const [inline] |
Access the internal flags: this is needed for some foreign language interfaces.
Definition at line 34 of file Poly_Con_Relation.inlines.hh.
References flags.
00034 { 00035 return flags; 00036 }
Poly_Con_Relation Parma_Polyhedra_Library::Poly_Con_Relation::nothing | ( | ) | [inline, static] |
The assertion that says nothing.
Definition at line 39 of file Poly_Con_Relation.inlines.hh.
References NOTHING, and Poly_Con_Relation().
Referenced by Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with(), and Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::relation_with().
00039 { 00040 return Poly_Con_Relation(NOTHING); 00041 }
Poly_Con_Relation Parma_Polyhedra_Library::Poly_Con_Relation::is_disjoint | ( | ) | [inline, static] |
The polyhedron and the set of points satisfying the constraint are disjoint.
Definition at line 44 of file Poly_Con_Relation.inlines.hh.
References IS_DISJOINT, and Poly_Con_Relation().
Referenced by Parma_Polyhedra_Library::interval_relation(), Parma_Polyhedra_Library::Polyhedron::relation_with(), Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::relation_with(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::Grid::relation_with(), Parma_Polyhedra_Library::Generator_System::relation_with(), Parma_Polyhedra_Library::Box< ITV >::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().
00044 { 00045 return Poly_Con_Relation(IS_DISJOINT); 00046 }
Poly_Con_Relation Parma_Polyhedra_Library::Poly_Con_Relation::strictly_intersects | ( | ) | [inline, static] |
The polyhedron intersects the set of points satisfying the constraint, but it is not included in it.
Definition at line 49 of file Poly_Con_Relation.inlines.hh.
References Poly_Con_Relation(), and STRICTLY_INTERSECTS.
Referenced by Parma_Polyhedra_Library::Polyhedron::BHRZ03_combining_constraints(), Parma_Polyhedra_Library::interval_relation(), Parma_Polyhedra_Library::Polyhedron::relation_with(), Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::Grid::relation_with(), Parma_Polyhedra_Library::Generator_System::relation_with(), Parma_Polyhedra_Library::Box< ITV >::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().
00049 { 00050 return Poly_Con_Relation(STRICTLY_INTERSECTS); 00051 }
Poly_Con_Relation Parma_Polyhedra_Library::Poly_Con_Relation::is_included | ( | ) | [inline, static] |
The polyhedron is included in the set of points satisfying the constraint.
Definition at line 54 of file Poly_Con_Relation.inlines.hh.
References IS_INCLUDED, and Poly_Con_Relation().
Referenced by Parma_Polyhedra_Library::Octagonal_Shape< T >::difference_assign(), Parma_Polyhedra_Library::Grid::difference_assign(), Parma_Polyhedra_Library::BD_Shape< T >::difference_assign(), Parma_Polyhedra_Library::interval_relation(), Parma_Polyhedra_Library::Grid::limited_congruence_extrapolation_assign(), Parma_Polyhedra_Library::Grid::limited_extrapolation_assign(), Parma_Polyhedra_Library::Grid::limited_generator_extrapolation_assign(), Parma_Polyhedra_Library::Polyhedron::poly_difference_assign(), Parma_Polyhedra_Library::Polyhedron::relation_with(), Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::relation_with(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::Grid::relation_with(), Parma_Polyhedra_Library::Generator_System::relation_with(), Parma_Polyhedra_Library::Box< ITV >::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().
00054 { 00055 return Poly_Con_Relation(IS_INCLUDED); 00056 }
Poly_Con_Relation Parma_Polyhedra_Library::Poly_Con_Relation::saturates | ( | ) | [inline, static] |
The polyhedron is included in the set of points saturating the constraint.
Definition at line 59 of file Poly_Con_Relation.inlines.hh.
References Poly_Con_Relation(), and SATURATES.
Referenced by Parma_Polyhedra_Library::interval_relation(), Parma_Polyhedra_Library::Polyhedron::relation_with(), Parma_Polyhedra_Library::Pointset_Powerset< PS >::relation_with(), Parma_Polyhedra_Library::Partially_Reduced_Product< D1, D2, R >::relation_with(), Parma_Polyhedra_Library::Octagonal_Shape< T >::relation_with(), Parma_Polyhedra_Library::Grid::relation_with(), Parma_Polyhedra_Library::Generator_System::relation_with(), Parma_Polyhedra_Library::Box< ITV >::relation_with(), and Parma_Polyhedra_Library::BD_Shape< T >::relation_with().
00059 { 00060 return Poly_Con_Relation(SATURATES); 00061 }
void Parma_Polyhedra_Library::Poly_Con_Relation::ascii_dump | ( | ) | const |
Writes to std::cerr
an ASCII representation of *this
.
void Parma_Polyhedra_Library::Poly_Con_Relation::ascii_dump | ( | std::ostream & | s | ) | const |
Writes to s
an ASCII representation of *this
.
Definition at line 34 of file Poly_Con_Relation.cc.
References flags, implies(), IS_DISJOINT, IS_INCLUDED, NOTHING, SATURATES, and STRICTLY_INTERSECTS.
00034 { 00035 flags_t f = flags; 00036 if (f == NOTHING) { 00037 s << "NOTHING"; 00038 return; 00039 } 00040 00041 while (true) { 00042 if (implies(f, IS_DISJOINT)) { 00043 s << "IS_DISJOINT"; 00044 f &= ~IS_DISJOINT; 00045 } 00046 else if (implies(f, STRICTLY_INTERSECTS)) { 00047 s << "STRICTLY_INTERSECTS"; 00048 f &= ~STRICTLY_INTERSECTS; 00049 } 00050 else if (implies(f, IS_INCLUDED)) { 00051 s << "IS_INCLUDED"; 00052 f &= ~IS_INCLUDED; 00053 } 00054 else if (implies(f, SATURATES)) { 00055 s << "SATURATES"; 00056 f &= ~SATURATES; 00057 } 00058 if (f != NOTHING) 00059 s << " & "; 00060 else 00061 break; 00062 } 00063 }
void Parma_Polyhedra_Library::Poly_Con_Relation::print | ( | ) | const |
Prints *this
to std::cerr
using operator<<
.
bool Parma_Polyhedra_Library::Poly_Con_Relation::implies | ( | const Poly_Con_Relation & | y | ) | const [inline] |
bool Parma_Polyhedra_Library::Poly_Con_Relation::OK | ( | ) | const |
bool operator== | ( | const Poly_Con_Relation & | x, | |
const Poly_Con_Relation & | y | |||
) | [friend] |
True if and only if x
and y
are logically equivalent.
Definition at line 75 of file Poly_Con_Relation.inlines.hh.
bool operator!= | ( | const Poly_Con_Relation & | x, | |
const Poly_Con_Relation & | y | |||
) | [friend] |
True if and only if x
and y
are not logically equivalent.
Definition at line 81 of file Poly_Con_Relation.inlines.hh.
Poly_Con_Relation operator && | ( | const Poly_Con_Relation & | x, | |
const Poly_Con_Relation & | y | |||
) | [friend] |
Yields the logical conjunction of x
and y
.
Definition at line 87 of file Poly_Con_Relation.inlines.hh.
00087 { 00088 return Poly_Con_Relation(x.flags | y.flags); 00089 }
Poly_Con_Relation operator- | ( | const Poly_Con_Relation & | x, | |
const Poly_Con_Relation & | y | |||
) | [friend] |
Yields the assertion with all the conjuncts of x
that are not in y
.
Definition at line 93 of file Poly_Con_Relation.inlines.hh.
00093 { 00094 return Poly_Con_Relation(x.flags & ~y.flags); 00095 }
std::ostream & operator<< | ( | std::ostream & | s, | |
const Poly_Con_Relation & | r | |||
) | [friend] |
const flags_t Parma_Polyhedra_Library::Poly_Con_Relation::NOTHING = 0U [static, private] |
const flags_t Parma_Polyhedra_Library::Poly_Con_Relation::IS_DISJOINT = 1U << 0 [static, private] |
Definition at line 80 of file Poly_Con_Relation.defs.hh.
Referenced by ascii_dump(), and is_disjoint().
const flags_t Parma_Polyhedra_Library::Poly_Con_Relation::STRICTLY_INTERSECTS = 1U << 1 [static, private] |
Definition at line 81 of file Poly_Con_Relation.defs.hh.
Referenced by ascii_dump(), and strictly_intersects().
const flags_t Parma_Polyhedra_Library::Poly_Con_Relation::IS_INCLUDED = 1U << 2 [static, private] |
Definition at line 82 of file Poly_Con_Relation.defs.hh.
Referenced by ascii_dump(), and is_included().
const flags_t Parma_Polyhedra_Library::Poly_Con_Relation::SATURATES = 1U << 3 [static, private] |
Definition at line 83 of file Poly_Con_Relation.defs.hh.
Referenced by ascii_dump(), and saturates().
const flags_t Parma_Polyhedra_Library::Poly_Con_Relation::EVERYTHING [static, private] |
This holds the current bitset.
Definition at line 94 of file Poly_Con_Relation.defs.hh.
Referenced by ascii_dump(), get_flags(), and implies().