PPL  1.2
PIP_Problem_inlines.hh
Go to the documentation of this file.
1 /* PIP_Problem 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_PIP_Problem_inlines_hh
25 #define PPL_PIP_Problem_inlines_hh 1
26 
27 namespace Parma_Polyhedra_Library {
28 
29 inline dimension_type
31  return external_space_dim;
32 }
33 
34 inline dimension_type
37 }
38 
41  return input_cs.begin();
42 }
43 
46  return input_cs.end();
47 }
48 
49 inline const Variables_Set&
51  return parameters;
52 }
53 
54 inline void
56  using std::swap;
59  swap(status, y.status);
65  for (dimension_type i = CONTROL_PARAMETER_NAME_SIZE; i-- > 0; ) {
67  }
69 }
70 
71 inline PIP_Problem&
73  PIP_Problem tmp(y);
74  m_swap(tmp);
75  return *this;
76 }
77 
80  PPL_ASSERT(name >= 0 && name < CONTROL_PARAMETER_NAME_SIZE);
81  return control_parameters[name];
82 }
83 
84 inline dimension_type
87 }
88 
90 inline void
92  x.m_swap(y);
93 }
94 
95 } // namespace Parma_Polyhedra_Library
96 
97 #endif // !defined(PPL_PIP_Problem_inlines_hh)
PIP_Problem & operator=(const PIP_Problem &y)
Assignment operator.
dimension_type internal_space_dim
The space dimension of the current (partial) solution of the PIP problem; it may be smaller than exte...
const_iterator constraints_end() const
Returns a past-the-end read-only iterator to the sequence of constraints defining the feasible region...
static dimension_type max_space_dimension()
Returns the maximum space dimension a PIP_Problem can handle.
void swap(CO_Tree &x, CO_Tree &y)
size_t dimension_type
An unsigned integral type for representing space dimensions.
An std::set of variables' indexes.
Variables_Set parameters
A set containing all the indices of space dimensions that are interpreted as problem parameters...
dimension_type external_space_dim
The dimension of the vector space.
PIP_Tree_Node * current_solution
The current solution decision tree.
Constraint_Sequence::const_iterator const_iterator
A type alias for the read-only iterator on the constraints defining the feasible region.
dimension_type space_dimension() const
Returns the space dimension of the PIP problem.
A Parametric Integer (linear) Programming problem.
void m_swap(PIP_Problem &y)
Swaps *this with y.
Constraint_Sequence input_cs
The sequence of constraints describing the feasible region.
Control_Parameter_Value control_parameters[CONTROL_PARAMETER_NAME_SIZE]
The control parameters for the problem object.
Control_Parameter_Value
Possible values for PIP_Problem control parameters.
const Variables_Set & parameter_space_dimensions() const
Returns a set containing all the variables' indexes representing the parameters of the PIP problem...
dimension_type first_pending_constraint
The first index of `input_cs' containing a pending constraint.
Status status
The internal state of the MIP problem.
void swap(PIP_Problem &x, PIP_Problem &y)
Swaps x with y.
The entire library is confined to this namespace.
Definition: version.hh:61
dimension_type big_parameter_dimension
The dimension for the big parameter, or not_a_dimension() if not set.
Matrix< Row > initial_context
The initial context.
Control_Parameter_Name
Possible names for PIP_Problem control parameters.
dimension_type get_big_parameter_dimension() const
Returns the space dimension for the big parameter.
const_iterator constraints_begin() const
Returns a read-only iterator to the first constraint defining the feasible region.
static dimension_type max_space_dimension()
Returns the maximum space dimension a Constraint can handle.
Control_Parameter_Value get_control_parameter(Control_Parameter_Name name) const
Returns the value of control parameter name.