PPL  1.2
NNC_Polyhedron_inlines.hh
Go to the documentation of this file.
1 /* NNC_Polyhedron class implementation: inline functions.
2  Copyright (C) 2001-2010 Roberto Bagnara <bagnara@cs.unipr.it>
3  Copyright (C) 2010-2016 BUGSENG srl (http://bugseng.com)
4 
5 This file is part of the Parma Polyhedra Library (PPL).
6 
7 The PPL is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 3 of the License, or (at your
10 option) any later version.
11 
12 The PPL is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307, USA.
20 
21 For the most up-to-date information see the Parma Polyhedra Library
22 site: http://bugseng.com/products/ppl/ . */
23 
24 #ifndef PPL_NNC_Polyhedron_inlines_hh
25 #define PPL_NNC_Polyhedron_inlines_hh 1
26 
27 #include "C_Polyhedron_defs.hh"
28 
29 namespace Parma_Polyhedra_Library {
30 
31 inline
33 }
34 
35 inline
37  Degenerate_Element kind)
39  check_space_dimension_overflow(num_dimensions,
41  "NNC_Polyhedron(n, k)",
42  "n exceeds the maximum "
43  "allowed space dimension"),
44  kind) {
45 }
46 
47 inline
50  check_obj_space_dimension_overflow(cs, NOT_NECESSARILY_CLOSED,
51  "NNC_Polyhedron(cs)",
52  "the space dimension of cs "
53  "exceeds the maximum allowed "
54  "space dimension")) {
55 }
56 
57 inline
60  check_obj_space_dimension_overflow(cs, NOT_NECESSARILY_CLOSED,
61  "NNC_Polyhedron(cs, recycle)",
62  "the space dimension of cs "
63  "exceeds the maximum allowed "
64  "space dimension"),
65  Recycle_Input()) {
66 }
67 
68 inline
71  check_obj_space_dimension_overflow(gs, NOT_NECESSARILY_CLOSED,
72  "NNC_Polyhedron(gs)",
73  "the space dimension of gs "
74  "exceeds the maximum allowed "
75  "space dimension")) {
76 }
77 
78 inline
81  check_obj_space_dimension_overflow(gs, NOT_NECESSARILY_CLOSED,
82  "NNC_Polyhedron(gs, recycle)",
83  "the space dimension of gs "
84  "exceeds the maximum allowed "
85  "space dimension"),
86  Recycle_Input()) {
87 }
88 
89 template <typename Interval>
90 inline
93  check_obj_space_dimension_overflow(box, NOT_NECESSARILY_CLOSED,
94  "NNC_Polyhedron(box)",
95  "the space dimension of box "
96  "exceeds the maximum allowed "
97  "space dimension")) {
98 }
99 
100 template <typename U>
101 inline
104  check_space_dimension_overflow(bd.space_dimension(),
106  "NNC_Polyhedron(bd)",
107  "the space dimension of bd "
108  "exceeds the maximum allowed "
109  "space dimension"),
110  UNIVERSE) {
112 }
113 
114 template <typename U>
115 inline
118  check_space_dimension_overflow(os.space_dimension(),
120  "NNC_Polyhedron(os)",
121  "the space dimension of os "
122  "exceeds the maximum allowed "
123  "space dimension"),
124  UNIVERSE) {
126 }
127 
128 inline
130  : Polyhedron(y) {
131 }
132 
133 inline NNC_Polyhedron&
136  return *this;
137 }
138 
139 inline NNC_Polyhedron&
141  NNC_Polyhedron nnc_y(y);
142  m_swap(nnc_y);
143  return *this;
144 }
145 
146 inline bool
148  return poly_hull_assign_if_exact(y);
149 }
150 
151 inline void
154 }
155 
156 } // namespace Parma_Polyhedra_Library
157 
158 #endif // !defined(PPL_NNC_Polyhedron_inlines_hh)
size_t dimension_type
An unsigned integral type for representing space dimensions.
bool upper_bound_assign_if_exact(const NNC_Polyhedron &y)
Same as poly_hull_assign_if_exact(y).
Polyhedron & operator=(const Polyhedron &y)
The assignment operator. (*this and y can be dimension-incompatible.)
Constraint_System constraints() const
Returns the system of constraints defining *this.
void positive_time_elapse_assign(const Polyhedron &y)
Assigns to *this (the best approximation of) the result of computing the positive time-elapse between...
Complexity_Class
Complexity pseudo-classes.
The base class for convex polyhedra.
NNC_Polyhedron(dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE)
Builds either the universe or the empty NNC polyhedron.
Degenerate_Element
Kinds of degenerate abstract elements.
dimension_type check_space_dimension_overflow(const dimension_type dim, const dimension_type max, const char *domain, const char *method, const char *reason)
Definition: globals.cc:48
A not necessarily closed convex polyhedron.
Constraint_System constraints() const
Returns a system of constraints defining *this.
A not necessarily closed, iso-oriented hyperrectangle.
Definition: Box_defs.hh:299
A closed convex polyhedron.
The universe element, i.e., the whole vector space.
void add_constraints(const Constraint_System &cs)
Adds a copy of the constraints in cs to the system of constraints of *this (without minimizing the re...
void positive_time_elapse_assign_impl(const Polyhedron &y)
Assuming *this is NNC, assigns to *this the result of the "positive time-elapse" between *this and y...
The entire library is confined to this namespace.
Definition: version.hh:61
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.
A bounded difference shape.
NNC_Polyhedron & operator=(const NNC_Polyhedron &y)
The assignment operator. (*this and y can be dimension-incompatible.)
void m_swap(Polyhedron &y)
Swaps *this with polyhedron y. (*this and y can be dimension-incompatible.)