A not necessarily closed convex polyhedron. More...
#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). | |
A not necessarily closed convex polyhedron.
An object of the class NNC_Polyhedron represents a not necessarily closed (NNC) convex polyhedron in the vector space
.
Definition at line 46 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. |
Both parameters are optional: by default, a 0-dimension space universe NNC polyhedron is built.
Definition at line 36 of file NNC_Polyhedron.inlines.hh.
00038 : Polyhedron(NOT_NECESSARILY_CLOSED, 00039 num_dimensions <= max_space_dimension() 00040 ? num_dimensions 00041 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00042 "NNC_Polyhedron(n, k)", 00043 "n exceeds the maximum " 00044 "allowed space dimension"), 00045 num_dimensions), 00046 kind) { 00047 }
| 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 50 of file NNC_Polyhedron.inlines.hh.
00051 : Polyhedron(NOT_NECESSARILY_CLOSED, 00052 cs.space_dimension() <= max_space_dimension() 00053 ? cs 00054 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00055 "NNC_Polyhedron(cs)", 00056 "the space dimension of cs " 00057 "exceeds the maximum allowed " 00058 "space dimension"), cs)) { 00059 }
| 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 62 of file NNC_Polyhedron.inlines.hh.
00063 : Polyhedron(NOT_NECESSARILY_CLOSED, 00064 cs.space_dimension() <= max_space_dimension() 00065 ? cs 00066 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00067 "NNC_Polyhedron(cs, recycle)", 00068 "the space dimension of cs " 00069 "exceeds the maximum allowed " 00070 "space dimension"), cs), 00071 Recycle_Input()) { 00072 }
| 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 75 of file NNC_Polyhedron.inlines.hh.
00076 : Polyhedron(NOT_NECESSARILY_CLOSED, 00077 gs.space_dimension() <= max_space_dimension() 00078 ? gs 00079 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00080 "NNC_Polyhedron(gs)", 00081 "the space dimension of gs " 00082 "exceeds the maximum allowed " 00083 "space dimension"), gs)) { 00084 }
| 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 87 of file NNC_Polyhedron.inlines.hh.
00088 : Polyhedron(NOT_NECESSARILY_CLOSED, 00089 gs.space_dimension() <= max_space_dimension() 00090 ? gs 00091 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00092 "NNC_Polyhedron(gs, recycle)", 00093 "the space dimension of gs " 00094 "exceeds the maximum allowed " 00095 "space dimension"), gs), 00096 Recycle_Input()) { 00097 }
| 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 39 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_congruences(), and Parma_Polyhedra_Library::Polyhedron::OK().
00040 : Polyhedron(NOT_NECESSARILY_CLOSED, 00041 cgs.space_dimension() <= max_space_dimension() 00042 ? cgs.space_dimension() 00043 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00044 "NNC_Polyhedron(cgs)", 00045 "the space dimension of cgs " 00046 "exceeds the maximum allowed " 00047 "space dimension"), 0), 00048 UNIVERSE) { 00049 add_congruences(cgs); 00050 PPL_ASSERT_HEAVY(OK()); 00051 }
| 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 53 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_congruences(), and Parma_Polyhedra_Library::Polyhedron::OK().
00054 : Polyhedron(NOT_NECESSARILY_CLOSED, 00055 cgs.space_dimension() <= max_space_dimension() 00056 ? cgs.space_dimension() 00057 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00058 "NNC_Polyhedron" 00059 "(cgs, recycle)", 00060 "the space dimension of cgs " 00061 "exceeds the maximum allowed " 00062 "space dimension"), 0), 00063 UNIVERSE) { 00064 add_congruences(cgs); 00065 PPL_ASSERT_HEAVY(OK()); 00066 }
| 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 33 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_constraints(), Parma_Polyhedra_Library::Polyhedron::constraints(), and Parma_Polyhedra_Library::Polyhedron::OK().
00034 : Polyhedron(NOT_NECESSARILY_CLOSED, y.space_dimension(), UNIVERSE) { 00035 add_constraints(y.constraints()); 00036 PPL_ASSERT_HEAVY(OK()); 00037 }
| 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 101 of file NNC_Polyhedron.inlines.hh.
00102 : Polyhedron(NOT_NECESSARILY_CLOSED, 00103 box.space_dimension() <= max_space_dimension() 00104 ? box 00105 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00106 "NNC_Polyhedron(box)", 00107 "the space dimension of box " 00108 "exceeds the maximum allowed " 00109 "space dimension"), box)) { 00110 }
| 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 68 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::add_constraints(), and Parma_Polyhedra_Library::Grid::constraints().
00069 : Polyhedron(NOT_NECESSARILY_CLOSED, 00070 grid.space_dimension() <= max_space_dimension() 00071 ? grid.space_dimension() 00072 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED, 00073 "C_Polyhedron(grid)", 00074 "the space dimension of grid " 00075 "exceeds the maximum allowed " 00076 "space dimension"), 0), 00077 UNIVERSE) { 00078 add_constraints(grid.constraints()); 00079 }
| 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 114 of file NNC_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::add_constraints(), and Parma_Polyhedra_Library::BD_Shape< T >::constraints().
00115 : Polyhedron(NOT_NECESSARILY_CLOSED, 00116 bd.space_dimension() <= max_space_dimension() 00117 ? bd.space_dimension() 00118 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00119 "NNC_Polyhedron(bd): ", 00120 "the space dimension of bd " 00121 "exceeds the maximum allowed " 00122 "space dimension"), 0), 00123 UNIVERSE) { 00124 add_constraints(bd.constraints()); 00125 }
| 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 129 of file NNC_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::add_constraints(), and Parma_Polyhedra_Library::Octagonal_Shape< T >::constraints().
00130 : Polyhedron(NOT_NECESSARILY_CLOSED, 00131 os.space_dimension() <= max_space_dimension() 00132 ? os.space_dimension() 00133 : (throw_space_dimension_overflow(NECESSARILY_CLOSED, 00134 "NNC_Polyhedron(os): ", 00135 "the space dimension of os " 00136 "exceeds the maximum allowed " 00137 "space dimension"), 0), 00138 UNIVERSE) { 00139 add_constraints(os.constraints()); 00140 }
| Parma_Polyhedra_Library::NNC_Polyhedron::NNC_Polyhedron | ( | const NNC_Polyhedron & | y, | |
| Complexity_Class | complexity = ANY_COMPLEXITY | |||
| ) | [inline] |
Ordinary copy constructor.
Definition at line 143 of file NNC_Polyhedron.inlines.hh.
00144 : Polyhedron(y) { 00145 }
| Parma_Polyhedra_Library::NNC_Polyhedron::~NNC_Polyhedron | ( | ) | [inline] |
| NNC_Polyhedron & Parma_Polyhedra_Library::NNC_Polyhedron::operator= | ( | const C_Polyhedron & | y | ) | [inline] |
Assigns to *this the C polyhedron y.
Definition at line 154 of file NNC_Polyhedron.inlines.hh.
References Parma_Polyhedra_Library::Polyhedron::swap().
00154 { 00155 NNC_Polyhedron nnc_y(y); 00156 swap(nnc_y); 00157 return *this; 00158 }
| 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 148 of file NNC_Polyhedron.inlines.hh.
00148 { 00149 Polyhedron::operator=(y); 00150 return *this; 00151 }
| 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 82 of file NNC_Polyhedron.cc.
References Parma_Polyhedra_Library::Polyhedron::BHZ09_poly_hull_assign_if_exact(), Parma_Polyhedra_Library::Polyhedron::space_dimension(), and Parma_Polyhedra_Library::Polyhedron::throw_dimension_incompatible().
Referenced by upper_bound_assign_if_exact().
00082 { 00083 #define USE_BHZ09 1 00084 #if USE_BHZ09 // [BagnaraHZ09] 00085 // Dimension-compatibility check. 00086 if (space_dimension() != y.space_dimension()) 00087 throw_dimension_incompatible("poly_hull_assign_if_exact(y)", "y", y); 00088 return BHZ09_poly_hull_assign_if_exact(y); 00089 #else // Old implementation. 00090 return PPL::poly_hull_assign_if_exact(*this, y); 00091 #endif 00092 #undef USE_BHZ09 00093 }
| 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 161 of file NNC_Polyhedron.inlines.hh.
References poly_hull_assign_if_exact().
00161 { 00162 return poly_hull_assign_if_exact(y); 00163 }
1.6.3