Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

Loading...
Searching...
No Matches
lpsolution.h
Go to the documentation of this file.
1
30#pragma once
31
33
34#pragma GCC visibility push(default)
35namespace abacus {
36
37
38class Master;
39class Sub;
40template<class BaseType, class CoType> class Active;
41template<class CoType,class BaseType> class Separator;
42
43template <class BaseType, class CoType>
44class LpSolution;
45
46template <class BaseType, class CoType>
47std::ostream &operator<< (std::ostream &out, const LpSolution<BaseType, CoType> &rhs);
48
49
51
64template <class BaseType, class CoType>
65class LpSolution : public AbacusRoot {
66
67 friend class Separator< CoType, BaseType>;
68
69public:
70
72
81 LpSolution(Sub *sub, bool primalVariables, Active<BaseType, CoType> *active);
82
84
88
90
94
97
99
105 friend std::ostream &operator<< <> (std::ostream &out, const LpSolution<BaseType, CoType> &rhs);
106
108 int nVarCon() const;
109
111 double *zVal();
112
114 const double *zVal() const;
115
118
120 int idSub() const;
121
123 int idLp() const;
124
125
126protected:
128
130 int idSub_;
131 int idLp_;
132
135
136private:
139};
140
141
142}
143
145#pragma GCC visibility pop
Base class of all other classes of ABACUS.
Definition abacusroot.h:69
Implements the sets of active constraints and variables which are associated with each subproblem.
Definition active.h:63
LP solutions.
Definition lpsolution.h:65
Array< double > zVal_
The primal/dual variables of the LP solution.
Definition lpsolution.h:133
int idSub_
The Id of the subproblem in which the LP solution was generated.
Definition lpsolution.h:130
int nVarCon_
The number of variables/constraints.
Definition lpsolution.h:129
LpSolution(Master *master)
The constructor.
~LpSolution()
The destructor.
LpSolution(Sub *sub, bool primalVariables, Active< BaseType, CoType > *active)
The constructor.
LpSolution(const LpSolution< BaseType, CoType > &rhs)
The copy constructor.
Active< BaseType, CoType > * active()
Returns the active variables/constraints.
const LpSolution< BaseType, CoType > & operator=(const LpSolution< BaseType, CoType > &rhs)
Active< BaseType, CoType > * active_
The active variables/constraints.
Definition lpsolution.h:134
Master * master_
A pointer to the corresponding master of the optimization.
Definition lpsolution.h:127
const double * zVal() const
Returns the primal/dual variables of the LP solution.
int nVarCon() const
Returns the number of variables (if BaseType is Variable) or the number of constraints (if BaseType i...
int idLp() const
Returns the Id of the LP in which the LP solution was generated.
double * zVal()
Returns the primal/dual variables of the LP solution.
int idLp_
The Id of the LP in which the LP solution was generated.
Definition lpsolution.h:131
int idSub() const
Returns the Id of the subproblem in which the LP solution was generated.
The master of the optimization.
Definition master.h:70
Separators.
Definition separator.h:67
The subproblem.
Definition sub.h:69
The parameterized class Array implements dynamic arrays of type E.
Definition Array.h:219
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)