#include <NNC_Polyhedron.defs.hh>
Public Member Functions | |
NNC_Polyhedron (dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE) | |
Builds either the universe or the empty NNC polyhedron. | |
NNC_Polyhedron (const Constraint_System &cs) | |
Builds an NNC polyhedron from a system of constraints. | |
NNC_Polyhedron (Constraint_System &cs, Recycle_Input dummy) | |
Builds an NNC polyhedron recycling a system of constraints. | |
NNC_Polyhedron (const Generator_System &gs) | |
Builds an NNC polyhedron from a system of generators. | |
NNC_Polyhedron (Generator_System &gs, Recycle_Input dummy) | |
Builds an NNC polyhedron recycling a system of generators. | |
NNC_Polyhedron (const Congruence_System &cgs) | |
Builds an NNC polyhedron from a system of congruences. | |
NNC_Polyhedron (Congruence_System &cgs, Recycle_Input dummy) | |
Builds an NNC polyhedron recycling a system of congruences. | |
NNC_Polyhedron (const C_Polyhedron &y, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds an NNC polyhedron from the C polyhedron y . | |
template<typename Interval> | |
NNC_Polyhedron (const Box< Interval > &box, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds an NNC polyhedron out of a box. | |
NNC_Polyhedron (const Grid &grid, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds an NNC polyhedron out of a grid. | |
template<typename U> | |
NNC_Polyhedron (const BD_Shape< U > &bd, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a NNC polyhedron out of a BD shape. | |
template<typename U> | |
NNC_Polyhedron (const Octagonal_Shape< U > &os, Complexity_Class complexity=ANY_COMPLEXITY) | |
Builds a NNC polyhedron out of an octagonal shape. | |
NNC_Polyhedron (const NNC_Polyhedron &y, Complexity_Class complexity=ANY_COMPLEXITY) | |
Ordinary copy-constructor. | |
NNC_Polyhedron & | operator= (const NNC_Polyhedron &y) |
The assignment operator. (*this and y can be dimension-incompatible.). | |
NNC_Polyhedron & | operator= (const C_Polyhedron &y) |
Assigns to *this the C polyhedron y . | |
~NNC_Polyhedron () | |
Destructor. | |
bool | poly_hull_assign_if_exact (const NNC_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 NNC_Polyhedron &y) |
Same as poly_hull_assign_if_exact(y). |
An object of the class NNC_Polyhedron represents a not necessarily closed (NNC) convex polyhedron in the vector space .
Definition at line 45 of file NNC_Polyhedron.defs.hh.
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | dimension_type | num_dimensions = 0 , |
|
Degenerate_Element | kind = UNIVERSE | |||
) | [inline, explicit] |
Builds either the universe or the empty NNC polyhedron.
num_dimensions | The number of dimensions of the vector space enclosing the NNC polyhedron; | |
kind | Specifies whether a universe or an empty NNC polyhedron should be built. |
std::length_error | Thrown if num_dimensions exceeds the maximum allowed space dimension. |
Definition at line 35 of file NNC_Polyhedron.inlines.hh.
00037 : Polyhedron(NOT_NECESSARILY_CLOSED, 00038 num_dimensions <= max_space_dimension() 00039 ? num_dimensions 00040 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00041 "NNC_Polyhedron(n, k)", 00042 "n exceeds the maximum " 00043 "allowed space dimension"), 00044 num_dimensions), 00045 kind) { 00046 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const Constraint_System & | cs | ) | [inline, explicit] |
Builds an NNC polyhedron from a system of constraints.
The polyhedron inherits the space dimension of the constraint system.
cs | The system of constraints defining the polyhedron. |
Definition at line 49 of file NNC_Polyhedron.inlines.hh.
00050 : Polyhedron(NOT_NECESSARILY_CLOSED, 00051 cs.space_dimension() <= max_space_dimension() 00052 ? cs 00053 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00054 "NNC_Polyhedron(cs)", 00055 "the space dimension of cs " 00056 "exceeds the maximum allowed " 00057 "space dimension"), cs)) { 00058 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | Constraint_System & | cs, | |
Recycle_Input | dummy | |||
) | [inline] |
Builds an NNC 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 may be recycled to build the polyhedron. | |
dummy | A dummy tag to syntactically differentiate this one from the other constructors. |
Definition at line 61 of file NNC_Polyhedron.inlines.hh.
00062 : Polyhedron(NOT_NECESSARILY_CLOSED, 00063 cs.space_dimension() <= max_space_dimension() 00064 ? cs 00065 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00066 "NNC_Polyhedron(cs, recycle)", 00067 "the space dimension of cs " 00068 "exceeds the maximum allowed " 00069 "space dimension"), cs), 00070 Recycle_Input()) { 00071 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const Generator_System & | gs | ) | [inline, explicit] |
Builds an NNC 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. |
Definition at line 74 of file NNC_Polyhedron.inlines.hh.
00075 : Polyhedron(NOT_NECESSARILY_CLOSED, 00076 gs.space_dimension() <= max_space_dimension() 00077 ? gs 00078 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00079 "NNC_Polyhedron(gs)", 00080 "the space dimension of gs " 00081 "exceeds the maximum allowed " 00082 "space dimension"), gs)) { 00083 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | Generator_System & | gs, | |
Recycle_Input | dummy | |||
) | [inline] |
Builds an NNC 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 may be recycled to build the polyhedron. | |
dummy | A dummy tag to syntactically differentiate this one from the other constructors. |
std::invalid_argument | Thrown if the system of generators is not empty but has no points. |
Definition at line 86 of file NNC_Polyhedron.inlines.hh.
00087 : Polyhedron(NOT_NECESSARILY_CLOSED, 00088 gs.space_dimension() <= max_space_dimension() 00089 ? gs 00090 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00091 "NNC_Polyhedron(gs, recycle)", 00092 "the space dimension of gs " 00093 "exceeds the maximum allowed " 00094 "space dimension"), gs), 00095 Recycle_Input()) { 00096 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const Congruence_System & | cgs | ) | [explicit] |
Builds an NNC 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 may be recycled to build the polyhedron. |
Definition at line 38 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_congruences(), and Parma_Polyhedra_Library::Polyhedron::OK().
00039 : Polyhedron(NOT_NECESSARILY_CLOSED, 00040 cgs.space_dimension() <= max_space_dimension() 00041 ? cgs.space_dimension() 00042 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00043 "NNC_Polyhedron(cgs)", 00044 "the space dimension of cgs " 00045 "exceeds the maximum allowed " 00046 "space dimension"), 0), 00047 UNIVERSE) { 00048 add_congruences(cgs); 00049 assert(OK()); 00050 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | Congruence_System & | cgs, | |
Recycle_Input | dummy | |||
) |
Builds an NNC 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 may be recycled to build the polyhedron. | |
dummy | A dummy tag to syntactically differentiate this one from the other constructors. |
Definition at line 52 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_congruences(), and Parma_Polyhedra_Library::Polyhedron::OK().
00053 : Polyhedron(NOT_NECESSARILY_CLOSED, 00054 cgs.space_dimension() <= max_space_dimension() 00055 ? cgs.space_dimension() 00056 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00057 "NNC_Polyhedron" 00058 "(cgs, recycle)", 00059 "the space dimension of cgs " 00060 "exceeds the maximum allowed " 00061 "space dimension"), 0), 00062 UNIVERSE) { 00063 add_congruences(cgs); 00064 assert(OK()); 00065 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const C_Polyhedron & | y, | |
Complexity_Class | complexity = ANY_COMPLEXITY | |||
) | [explicit] |
Builds an NNC polyhedron from the C polyhedron y
.
y | The C polyhedron to be used; | |
complexity | This argument is ignored. |
Definition at line 32 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_constraints(), Parma_Polyhedra_Library::Polyhedron::constraints(), and Parma_Polyhedra_Library::Polyhedron::OK().
00033 : Polyhedron(NOT_NECESSARILY_CLOSED, y.space_dimension(), UNIVERSE) { 00034 add_constraints(y.constraints()); 00035 assert(OK()); 00036 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const Box< Interval > & | box, | |
Complexity_Class | complexity = ANY_COMPLEXITY | |||
) | [inline, explicit] |
Builds an NNC polyhedron out of a box.
The polyhedron inherits the space dimension of the box and is the most precise that includes the box.
box | The box representing the polyhedron to be built; | |
complexity | This argument is ignored as the algorithm used has polynomial complexity. |
std::length_error | Thrown if the space dimension of box exceeds the maximum allowed space dimension. |
Definition at line 100 of file NNC_Polyhedron.inlines.hh.
00101 : Polyhedron(NOT_NECESSARILY_CLOSED, 00102 box.space_dimension() <= max_space_dimension() 00103 ? box 00104 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00105 "NNC_Polyhedron(box)", 00106 "the space dimension of box " 00107 "exceeds the maximum allowed " 00108 "space dimension"), box)) { 00109 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const Grid & | grid, | |
Complexity_Class | complexity = ANY_COMPLEXITY | |||
) | [explicit] |
Builds an NNC polyhedron out of a grid.
The polyhedron inherits the space dimension of the grid and is the most precise that includes the grid.
grid | The grid used to build the polyhedron. | |
complexity | This argument is ignored as the algorithm used has polynomial complexity. |
Definition at line 67 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_constraints(), and Parma_Polyhedra_Library::Grid::constraints().
00068 : Polyhedron(NOT_NECESSARILY_CLOSED, 00069 grid.space_dimension() <= max_space_dimension() 00070 ? grid.space_dimension() 00071 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00072 "C_Polyhedron(grid)", 00073 "the space dimension of grid " 00074 "exceeds the maximum allowed " 00075 "space dimension"), 0), 00076 UNIVERSE) { 00077 add_constraints(grid.constraints()); 00078 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const BD_Shape< U > & | bd, | |
Complexity_Class | complexity = ANY_COMPLEXITY | |||
) | [inline, explicit] |
Builds a NNC polyhedron out of a BD shape.
The polyhedron inherits the space dimension of the BD shape and is the most precise that includes the BD shape.
bd | The BD shape used to build the polyhedron. | |
complexity | This argument is ignored as the algorithm used has polynomial complexity. |
Definition at line 113 of file NNC_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::add_constraints(), and Parma_Polyhedra_Library::BD_Shape< T >::constraints().
00114 : Polyhedron(NOT_NECESSARILY_CLOSED, 00115 bd.space_dimension() <= max_space_dimension() 00116 ? bd.space_dimension() 00117 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00118 "NNC_Polyhedron(bd): ", 00119 "the space dimension of bd " 00120 "exceeds the maximum allowed " 00121 "space dimension"), 0), 00122 UNIVERSE) { 00123 add_constraints(bd.constraints()); 00124 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const Octagonal_Shape< U > & | os, | |
Complexity_Class | complexity = ANY_COMPLEXITY | |||
) | [inline, explicit] |
Builds a NNC polyhedron out of an octagonal shape.
The polyhedron inherits the space dimension of the octagonal shape and is the most precise that includes the octagonal shape.
os | The octagonal shape used to build the polyhedron. | |
complexity | This argument is ignored as the algorithm used has polynomial complexity. |
Definition at line 128 of file NNC_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::add_constraints(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::constraints().
00129 : Polyhedron(NOT_NECESSARILY_CLOSED, 00130 os.space_dimension() <= max_space_dimension() 00131 ? os.space_dimension() 00132 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00133 "NNC_Polyhedron(os): ", 00134 "the space dimension of os " 00135 "exceeds the maximum allowed " 00136 "space dimension"), 0), 00137 UNIVERSE) { 00138 add_constraints(os.constraints()); 00139 }
Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const NNC_Polyhedron & | y, | |
Complexity_Class | complexity = ANY_COMPLEXITY | |||
) | [inline] |
Ordinary copy-constructor.
Definition at line 142 of file NNC_Polyhedron.inlines.hh.
00143 : Polyhedron(y) { 00144 }
Parma_Polyhedra_Library::NNC_Polyhedron::~NNC_Polyhedron | ( | ) | [inline] |
NNC_Polyhedron & Parma_Polyhedra_Library::NNC_Polyhedron::operator= | ( | const NNC_Polyhedron & | y | ) | [inline] |
The assignment operator. (*this
and y
can be dimension-incompatible.).
Definition at line 147 of file NNC_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::operator=().
00147 { 00148 Polyhedron::operator=(y); 00149 return *this; 00150 }
NNC_Polyhedron & Parma_Polyhedra_Library::NNC_Polyhedron::operator= | ( | const C_Polyhedron & | y | ) | [inline] |
Assigns to *this
the C polyhedron y
.
Definition at line 153 of file NNC_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::swap().
00153 { 00154 NNC_Polyhedron nnc_y(y); 00155 swap(nnc_y); 00156 return *this; 00157 }
bool Parma_Polyhedra_Library::NNC_Polyhedron::poly_hull_assign_if_exact | ( | const NNC_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 81 of file NNC_Polyhedron.cc.
Referenced by upper_bound_assign_if_exact().
bool Parma_Polyhedra_Library::NNC_Polyhedron::upper_bound_assign_if_exact | ( | const NNC_Polyhedron & | y | ) | [inline] |
Same as poly_hull_assign_if_exact(y).
Definition at line 160 of file NNC_Polyhedron.inlines.hh.
References poly_hull_assign_if_exact().
00160 { 00161 return poly_hull_assign_if_exact(y); 00162 }