PPL  1.2
Variables_Set_defs.hh
Go to the documentation of this file.
1 /* Variables_Set class declaration.
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_Variables_Set_defs_hh
25 #define PPL_Variables_Set_defs_hh 1
26 
27 #include "Variables_Set_types.hh"
28 #include "Variable_defs.hh"
29 #include "globals_types.hh"
30 #include <iosfwd>
31 #include <set>
32 
33 namespace Parma_Polyhedra_Library {
34 
35 namespace IO_Operators {
36 
38 
39 std::ostream&
40 operator<<(std::ostream& s, const Variables_Set& vs);
41 
42 } // namespace IO_Operators
43 
44 } // namespace Parma_Polyhedra_Library
45 
48  : public std::set<dimension_type> {
49 private:
50  typedef std::set<dimension_type> Base;
51 
52 public:
54  Variables_Set();
55 
57  explicit Variables_Set(const Variable v);
58 
68  Variables_Set(const Variable v, const Variable w);
69 
72 
78 
80  void insert(Variable v);
81 
82  // The `insert' method above overloads (instead of hiding) the
83  // other `insert' method of std::set.
84  using Base::insert;
85 
91  bool ascii_load(std::istream& s);
92 
95 
98 
100  bool OK() const;
101 
103 };
104 
105 #include "Variables_Set_inlines.hh"
106 
107 #endif // !defined(PPL_Variables_Set_defs_hh)
dimension_type space_dimension() const
Returns the dimension of the smallest vector space enclosing all the variables whose indexes are in t...
size_t dimension_type
An unsigned integral type for representing space dimensions.
An std::set of variables' indexes.
bool OK() const
Checks if all the invariants are satisfied.
std::ostream & operator<<(std::ostream &s, const Ask_Tell< D > &x)
A dimension of the vector space.
#define PPL_OUTPUT_DECLARATIONS
static dimension_type max_space_dimension()
Returns the maximum space dimension a Variables_Set can handle.
bool ascii_load(std::istream &s)
Loads from s an ASCII representation (as produced by ascii_dump(std::ostream&) const) and sets *this ...
memory_size_type total_memory_in_bytes() const
Returns the total size in bytes of the memory occupied by *this.
The entire library is confined to this namespace.
Definition: version.hh:61
void insert(Variable v)
Inserts the index of variable v into the set.
Variables_Set()
Builds the empty set of variable indexes.
size_t memory_size_type
An unsigned integral type for representing memory size in bytes.
memory_size_type external_memory_in_bytes() const
Returns the size in bytes of the memory managed by *this.