00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef PPL_NNC_Polyhedron_inlines_hh
00024 #define PPL_NNC_Polyhedron_inlines_hh 1
00025
00026 #include "C_Polyhedron.defs.hh"
00027
00028 namespace Parma_Polyhedra_Library {
00029
00030 inline
00031 NNC_Polyhedron::NNC_Polyhedron(dimension_type num_dimensions,
00032 Degenerate_Element kind)
00033 : Polyhedron(NOT_NECESSARILY_CLOSED,
00034 num_dimensions <= max_space_dimension()
00035 ? num_dimensions
00036 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00037 "NNC_Polyhedron(n, k)",
00038 "n exceeds the maximum "
00039 "allowed space dimension"),
00040 num_dimensions),
00041 kind) {
00042 }
00043
00044 inline
00045 NNC_Polyhedron::NNC_Polyhedron(const Constraint_System& cs)
00046 : Polyhedron(NOT_NECESSARILY_CLOSED,
00047 cs.space_dimension() <= max_space_dimension()
00048 ? cs
00049 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00050 "NNC_Polyhedron(cs)",
00051 "the space dimension of cs "
00052 "exceeds the maximum allowed "
00053 "space dimension"), cs)) {
00054 }
00055
00056 inline
00057 NNC_Polyhedron::NNC_Polyhedron(Constraint_System& cs)
00058 : Polyhedron(NOT_NECESSARILY_CLOSED,
00059 cs.space_dimension() <= max_space_dimension()
00060 ? cs
00061 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00062 "NNC_Polyhedron(cs)",
00063 "the space dimension of cs "
00064 "exceeds the maximum allowed "
00065 "space dimension"), cs)) {
00066 }
00067
00068 inline
00069 NNC_Polyhedron::NNC_Polyhedron(const Generator_System& gs)
00070 : Polyhedron(NOT_NECESSARILY_CLOSED,
00071 gs.space_dimension() <= max_space_dimension()
00072 ? gs
00073 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00074 "NNC_Polyhedron(gs)",
00075 "the space dimension of gs "
00076 "exceeds the maximum allowed "
00077 "space dimension"), gs)) {
00078 }
00079
00080 inline
00081 NNC_Polyhedron::NNC_Polyhedron(Generator_System& gs)
00082 : Polyhedron(NOT_NECESSARILY_CLOSED,
00083 gs.space_dimension() <= max_space_dimension()
00084 ? gs
00085 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00086 "NNC_Polyhedron(gs)",
00087 "the space dimension of gs "
00088 "exceeds the maximum allowed "
00089 "space dimension"), gs)) {
00090 }
00091
00092 template <typename Box>
00093 inline
00094 NNC_Polyhedron::NNC_Polyhedron(const Box& box, From_Bounding_Box)
00095 : Polyhedron(NOT_NECESSARILY_CLOSED,
00096 box.space_dimension() <= max_space_dimension()
00097 ? box
00098 : (throw_space_dimension_overflow(NOT_NECESSARILY_CLOSED,
00099 "NNC_Polyhedron(box)",
00100 "the space dimension of box "
00101 "exceeds the maximum allowed "
00102 "space dimension"), box)) {
00103 }
00104
00105 inline
00106 NNC_Polyhedron::NNC_Polyhedron(const NNC_Polyhedron& y)
00107 : Polyhedron(y) {
00108 }
00109
00110 inline NNC_Polyhedron&
00111 NNC_Polyhedron::operator=(const NNC_Polyhedron& y) {
00112 Polyhedron::operator=(y);
00113 return *this;
00114 }
00115
00116 inline NNC_Polyhedron&
00117 NNC_Polyhedron::operator=(const C_Polyhedron& y) {
00118 NNC_Polyhedron nnc_y(y);
00119 swap(nnc_y);
00120 return *this;
00121 }
00122
00123 inline
00124 NNC_Polyhedron::~NNC_Polyhedron() {
00125 }
00126
00127 inline bool
00128 NNC_Polyhedron::upper_bound_assign_if_exact(const NNC_Polyhedron& y) {
00129 return poly_hull_assign_if_exact(y);
00130 }
00131
00132 }
00133
00134 #endif // !defined(PPL_NNC_Polyhedron_inlines_hh)