#include <C_Polyhedron.defs.hh>
Public Member Functions | |
C_Polyhedron (dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE) | |
Builds either the universe or the empty C polyhedron. | |
C_Polyhedron (const Constraint_System &cs) | |
Builds a C polyhedron from a system of constraints. | |
C_Polyhedron (Constraint_System &cs) | |
Builds a C polyhedron recycling a system of constraints. | |
C_Polyhedron (const Generator_System &gs) | |
Builds a C polyhedron from a system of generators. | |
C_Polyhedron (Generator_System &gs) | |
Builds a C polyhedron recycling a system of generators. | |
C_Polyhedron (const Congruence_System &cgs) | |
Builds a C polyhedron from a system of congruences. | |
C_Polyhedron (Congruence_System &cgs) | |
Builds an C polyhedron recycling a system of congruences. | |
C_Polyhedron (const NNC_Polyhedron &y) | |
Builds a C polyhedron representing the topological closure of the NNC polyhedron y . | |
template<typename Box> | |
C_Polyhedron (const Box &box, From_Bounding_Box dummy) | |
Builds a C polyhedron out of a generic, interval-based bounding box. | |
C_Polyhedron (const C_Polyhedron &y) | |
Ordinary copy-constructor. | |
C_Polyhedron & | operator= (const C_Polyhedron &y) |
The assignment operator. (*this and y can be dimension-incompatible.). | |
C_Polyhedron & | operator= (const NNC_Polyhedron &y) |
Assigns to *this the topological closure of the NNC polyhedron y . | |
~C_Polyhedron () | |
Destructor. | |
bool | poly_hull_assign_if_exact (const C_Polyhedron &y) |
If the poly-hull of *this and y is exact it is assigned to *this and true is returned, otherwise false is returned. | |
bool | upper_bound_assign_if_exact (const C_Polyhedron &y) |
Same as poly_hull_assign_if_exact(y). |
An object of the class C_Polyhedron represents a topologically closed convex polyhedron in the vector space .
When building a closed polyhedron starting from a system of constraints, an exception is thrown if the system contains a strict inequality constraint. Similarly, an exception is thrown when building a closed polyhedron starting from a system of generators containing a closure point.
Definition at line 55 of file C_Polyhedron.defs.hh.
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | dimension_type | num_dimensions = 0 , |
|
Degenerate_Element | kind = UNIVERSE | |||
) | [inline, explicit] |
Builds either the universe or the empty C polyhedron.
num_dimensions | The number of dimensions of the vector space enclosing the C polyhedron; | |
kind | Specifies whether a universe or an empty C polyhedron should be built. |
std::length_error | Thrown if num_dimensions exceeds the maximum allowed space dimension. |
Definition at line 32 of file C_Polyhedron.inlines.hh.
00034 : Polyhedron(NECESSARILY_CLOSED, 00035 num_dimensions <= max_space_dimension() 00036 ? num_dimensions 00037 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00038 "C_Polyhedron(n, k)", 00039 "n exceeds the maximum " 00040 "allowed space dimension"), 00041 num_dimensions), 00042 kind) { 00043 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const Constraint_System & | cs | ) | [inline, explicit] |
Builds a C polyhedron from a system of constraints.
The polyhedron inherits the space dimension of the constraint system.
cs | The system of constraints defining the polyhedron. |
std::invalid_argument | Thrown if the system of constraints contains strict inequalities. |
Definition at line 46 of file C_Polyhedron.inlines.hh.
00047 : Polyhedron(NECESSARILY_CLOSED, 00048 cs.space_dimension() <= max_space_dimension() 00049 ? cs 00050 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00051 "C_Polyhedron(cs)", 00052 "the space dimension of cs " 00053 "exceeds the maximum allowed " 00054 "space dimension"), cs)) { 00055 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | Constraint_System & | cs | ) | [inline, explicit] |
Builds a C polyhedron recycling a system of constraints.
The polyhedron inherits the space dimension of the constraint system.
cs | The system of constraints defining the polyhedron. It is not declared const because its data-structures will be recycled to build the polyhedron. |
std::invalid_argument | Thrown if the system of constraints contains strict inequalities. |
Definition at line 58 of file C_Polyhedron.inlines.hh.
00059 : Polyhedron(NECESSARILY_CLOSED, 00060 cs.space_dimension() <= max_space_dimension() 00061 ? cs 00062 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00063 "C_Polyhedron(cs)", 00064 "the space dimension of cs " 00065 "exceeds the maximum allowed " 00066 "space dimension"), cs)) { 00067 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const Generator_System & | gs | ) | [inline, explicit] |
Builds a C polyhedron from a system of generators.
The polyhedron inherits the space dimension of the generator system.
gs | The system of generators defining the polyhedron. |
std::invalid_argument | Thrown if the system of generators is not empty but has no points, or if it contains closure points. |
Definition at line 70 of file C_Polyhedron.inlines.hh.
00071 : Polyhedron(NECESSARILY_CLOSED, 00072 gs.space_dimension() <= max_space_dimension() 00073 ? gs 00074 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00075 "C_Polyhedron(cs)", 00076 "the space dimension of gs " 00077 "exceeds the maximum allowed " 00078 "space dimension"), gs)){ 00079 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | Generator_System & | gs | ) | [inline, explicit] |
Builds a C polyhedron recycling a system of generators.
The polyhedron inherits the space dimension of the generator system.
gs | The system of generators defining the polyhedron. It is not declared const because its data-structures will be recycled to build the polyhedron. |
std::invalid_argument | Thrown if the system of generators is not empty but has no points, or if it contains closure points. |
Definition at line 82 of file C_Polyhedron.inlines.hh.
00083 : Polyhedron(NECESSARILY_CLOSED, 00084 gs.space_dimension() <= max_space_dimension() 00085 ? gs 00086 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00087 "C_Polyhedron(cs)", 00088 "the space dimension of gs " 00089 "exceeds the maximum allowed " 00090 "space dimension"), gs)){ 00091 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const Congruence_System & | cgs | ) | [explicit] |
Builds a C polyhedron from a system of congruences.
The polyhedron inherits the space dimension of the congruence system.
cgs | The system of congruences defining the polyhedron. It is not declared const because its data-structures will be recycled to build the polyhedron. |
Definition at line 42 of file C_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_congruences().
00043 : Polyhedron(NECESSARILY_CLOSED, 00044 cgs.space_dimension() <= max_space_dimension() 00045 ? cgs.space_dimension() 00046 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00047 "C_Polyhedron(cgs)", 00048 "the space dimension of cgs " 00049 "exceeds the maximum allowed " 00050 "space dimension"), 0), 00051 UNIVERSE) { 00052 add_congruences(cgs); 00053 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | Congruence_System & | cgs | ) | [explicit] |
Builds an C polyhedron recycling a system of congruences.
The polyhedron inherits the space dimension of the congruence system.
cgs | The system of congruences defining the polyhedron. It is not declared const because its data-structures will be recycled to build the polyhedron. |
Definition at line 55 of file C_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_congruences().
00056 : Polyhedron(NECESSARILY_CLOSED, 00057 cgs.space_dimension() <= max_space_dimension() 00058 ? cgs.space_dimension() 00059 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00060 "NNC_Polyhedron(cgs)", 00061 "the space dimension of cgs " 00062 "exceeds the maximum allowed " 00063 "space dimension"), 0), 00064 UNIVERSE) { 00065 add_congruences(cgs); 00066 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const NNC_Polyhedron & | y | ) | [explicit] |
Builds a C polyhedron representing the topological closure of the NNC polyhedron y
.
Definition at line 31 of file C_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_constraint(), Parma_Polyhedra_Library::Constraint_System::begin(), Parma_Polyhedra_Library::Polyhedron::constraints(), Parma_Polyhedra_Library::Constraint_System::end(), Parma_Polyhedra_Library::Constraint::is_strict_inequality(), and Parma_Polyhedra_Library::Polyhedron::OK().
00032 : Polyhedron(NECESSARILY_CLOSED, y.space_dimension(), UNIVERSE) { 00033 const Constraint_System& cs = y.constraints(); 00034 for (Constraint_System::const_iterator i = cs.begin(), 00035 cs_end = cs.end(); i != cs_end; ++i) { 00036 const Constraint& c = *i; 00037 add_constraint(c.is_strict_inequality() ? (Linear_Expression(c) >= 0) : c); 00038 } 00039 assert(OK()); 00040 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const Box & | box, | |
From_Bounding_Box | dummy | |||
) | [inline] |
Builds a C polyhedron out of a generic, interval-based bounding box.
For a description of the methods that should be provided by the template class Box, see the documentation of the protected method: template <typename Box> Polyhedron::Polyhedron(Topology topol, const Box& box);
box | The bounding box representing the polyhedron to be built; | |
dummy | A dummy tag to syntactically differentiate this one from the other constructors. |
std::length_error | Thrown if the space dimension of box exceeds the maximum allowed space dimension. | |
std::invalid_argument | Thrown if box has intervals that are not topologically closed (i.e., having some finite but open bounds). |
Definition at line 95 of file C_Polyhedron.inlines.hh.
00096 : Polyhedron(NECESSARILY_CLOSED, 00097 box.space_dimension() <= max_space_dimension() 00098 ? box 00099 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00100 "C_Polyhedron(box): ", 00101 "the space dimension of box " 00102 "exceeds the maximum allowed " 00103 "space dimension"), box)) { 00104 }
Parma_Polyhedra_Library::C_Polyhedron::C_Polyhedron | ( | const C_Polyhedron & | y | ) | [inline] |
Ordinary copy-constructor.
Definition at line 107 of file C_Polyhedron.inlines.hh.
00108 : Polyhedron(y) { 00109 }
Parma_Polyhedra_Library::C_Polyhedron::~C_Polyhedron | ( | ) | [inline] |
C_Polyhedron & Parma_Polyhedra_Library::C_Polyhedron::operator= | ( | const C_Polyhedron & | y | ) | [inline] |
The assignment operator. (*this
and y
can be dimension-incompatible.).
Definition at line 112 of file C_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::operator=().
00112 { 00113 Polyhedron::operator=(y); 00114 return *this; 00115 }
C_Polyhedron & Parma_Polyhedra_Library::C_Polyhedron::operator= | ( | const NNC_Polyhedron & | y | ) | [inline] |
Assigns to *this
the topological closure of the NNC polyhedron y
.
Definition at line 118 of file C_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::swap().
00118 { 00119 C_Polyhedron c_y(y); 00120 swap(c_y); 00121 return *this; 00122 }
bool Parma_Polyhedra_Library::C_Polyhedron::poly_hull_assign_if_exact | ( | const C_Polyhedron & | y | ) |
If the poly-hull of *this
and y
is exact it is assigned to *this
and true
is returned, otherwise false
is returned.
std::invalid_argument | Thrown if *this and y are dimension-incompatible. |
Definition at line 69 of file C_Polyhedron.cc.
Referenced by upper_bound_assign_if_exact().
bool Parma_Polyhedra_Library::C_Polyhedron::upper_bound_assign_if_exact | ( | const C_Polyhedron & | y | ) | [inline] |
Same as poly_hull_assign_if_exact(y).
Definition at line 129 of file C_Polyhedron.inlines.hh.
References poly_hull_assign_if_exact().
00129 { 00130 return poly_hull_assign_if_exact(y); 00131 }