Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

lpsolution.h
Go to the documentation of this file.
1 
30 #pragma once
31 
33 
34 namespace abacus {
35 
36 
37 class Master;
38 class Sub;
39 template<class BaseType, class CoType> class Active;
40 template<class CoType,class BaseType> class Separator;
41 
42 template <class BaseType, class CoType>
43 class LpSolution;
44 
45 template <class BaseType, class CoType>
46 std::ostream &operator<< (std::ostream &out, const LpSolution<BaseType, CoType> &rhs);
47 
48 
50 
63 template <class BaseType, class CoType>
64 class LpSolution : public AbacusRoot {
65 
66  friend class Separator< CoType, BaseType>;
67 
68 public:
69 
71 
80  LpSolution(Sub *sub, bool primalVariables, Active<BaseType, CoType> *active);
81 
83 
86  LpSolution(Master *master);
87 
89 
93 
95  ~LpSolution();
96 
98 
104  friend std::ostream &operator<< <> (std::ostream &out, const LpSolution<BaseType, CoType> &rhs);
105 
107  int nVarCon() const;
108 
110  double *zVal();
111 
113  const double *zVal() const;
114 
117 
119  int idSub() const;
120 
122  int idLp() const;
123 
124 
125 protected:
127 
128  int nVarCon_;
129  int idSub_;
130  int idLp_;
131 
134 
135 private:
138 };
139 
140 
141 }
142 
abacus::LpSolution
LP solutions.
Definition: lpsolution.h:43
abacus::Active
Implements the sets of active constraints and variables which are associated with each subproblem.
Definition: active.h:43
abacus::LpSolution::LpSolution
LpSolution(Sub *sub, bool primalVariables, Active< BaseType, CoType > *active)
The constructor.
abacus::LpSolution::~LpSolution
~LpSolution()
The destructor.
abacus::LpSolution::active_
Active< BaseType, CoType > * active_
The active variables/constraints.
Definition: lpsolution.h:133
abacus::LpSolution::operator=
const LpSolution< BaseType, CoType > & operator=(const LpSolution< BaseType, CoType > &rhs)
abacus::LpSolution::idLp
int idLp() const
Returns the Id of the LP in which the LP solution was generated.
abacus::LpSolution::active
Active< BaseType, CoType > * active()
Returns the active variables/constraints.
abacus::operator<<
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)
abacusroot.h
abacus::LpSolution::nVarCon_
int nVarCon_
The number of variables/constraints.
Definition: lpsolution.h:128
abacus
Definition: abacusroot.h:48
abacus::LpSolution::zVal
double * zVal()
Returns the primal/dual variables of the LP solution.
abacus::LpSolution::idLp_
int idLp_
The Id of the LP in which the LP solution was generated.
Definition: lpsolution.h:130
abacus::LpSolution::master_
Master * master_
A pointer to the corresponding master of the optimization.
Definition: lpsolution.h:126
abacus::AbacusRoot
Base class of all other classes of ABACUS.
Definition: abacusroot.h:68
abacus::LpSolution::idSub
int idSub() const
Returns the Id of the subproblem in which the LP solution was generated.
ogdf::Array
The parameterized class Array implements dynamic arrays of type E.
Definition: Array.h:214
ogdf::AlgorithmFailureCode::Active
@ Active
lpsolution.inc
abacus::LpSolution::zVal_
Array< double > zVal_
The primal/dual variables of the LP solution.
Definition: lpsolution.h:132
abacus::Separator
Separators.
Definition: lpsolution.h:40
abacus::Sub
The subproblem.
Definition: sub.h:68
abacus::LpSolution::nVarCon
int nVarCon() const
Returns the number of variables (if BaseType is Variable) or the number of constraints (if BaseType i...
abacus::LpSolution::idSub_
int idSub_
The Id of the subproblem in which the LP solution was generated.
Definition: lpsolution.h:129
abacus::Master
The master of the optimization.
Definition: master.h:69