PPL  1.2
Pointset_Ask_Tell.cc
Go to the documentation of this file.
1 /* Pointset_Ask_Tell class implementation: non-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 #include "ppl-config.h"
26 
27 namespace PPL = Parma_Polyhedra_Library;
28 
29 template <>
30 template <>
33  : Base(), space_dim(y.space_dimension()) {
34  Pointset_Ask_Tell& x = *this;
36  y_end = y.end(); i != y_end; ++i) {
37  Determinate<NNC_Polyhedron> nnc_ask(NNC_Polyhedron(i->ask().pointset()));
38  Determinate<NNC_Polyhedron> nnc_tell(NNC_Polyhedron(i->tell().pointset()));
39  x.sequence.push_back(Pair(nnc_ask, nnc_tell));
40  }
41  x.normalized = y.normalized;
42  PPL_ASSERT_HEAVY(x.OK());
43 }
44 
45 template <>
46 template <>
49  : Base(), space_dim(y.space_dimension()) {
50  Pointset_Ask_Tell& x = *this;
52  y_end = y.end(); i != y_end; ++i) {
53  Determinate<C_Polyhedron> c_ask(C_Polyhedron(i->ask().pointset()));
54  Determinate<C_Polyhedron> c_tell(C_Polyhedron(i->tell().pointset()));
55  x.sequence.push_back(Pair(c_ask, c_tell));
56  }
57 
58  // Note: this might be non-normalized even when `y' is known to be
59  // normalized, because the constructor of C_Polyhedron, by enforcing
60  // topological closure, may have made different elements comparable.
61  x.normalized = false;
62  PPL_ASSERT_HEAVY(x.OK());
63 }
iterator begin()
Returns an iterator pointing to the first pair, if *this is not empty; otherwise, returns the past-th...
Pointset_Ask_Tell(dimension_type num_dimensions=0, Degenerate_Element kind=UNIVERSE)
Builds a universe (top) or empty (bottom) Pointset_Ask_Tell.
A wrapper for PPL pointsets, providing them with a determinate constraint system interface, as defined in [Bag98].
Sequence sequence
The sequence container holding the pairs/.
The ask-and-tell construction instantiated on PPL polyhedra.
A not necessarily closed convex polyhedron.
A closed convex polyhedron.
bool OK() const
Checks if all the invariants are satisfied.
A const_iterator on a sequence of read-only objects.
The entire library is confined to this namespace.
Definition: version.hh:61
bool normalized
If true, *this is normalized.
The ask and tell construction on a base-level domain.