Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

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 ostream &operator<< (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 ostream &operator<< <> (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 } //namespace abacus
142 
Base class of all other classes of ABACUS.
Definition: abacusroot.h:64
The master of the optimization.
Definition: master.h:69
Implements the sets of active constraints and variables which are associated with each subproblem...
Definition: active.h:43
The subproblem.
Definition: sub.h:68
Array< double > zVal_
The primal/dual variables of the LP solution.
Definition: lpsolution.h:132
Separators.
Definition: lpsolution.h:40
int nVarCon() const
Returns the number of variables (if BaseType is Variable) or the number of constraints (if BaseType i...
int idSub_
The Id of the subproblem in which the LP solution was generated.
Definition: lpsolution.h:129
LpSolution(Sub *sub, bool primalVariables, Active< BaseType, CoType > *active)
The constructor.
~LpSolution()
The destructor.
LP solutions.
Definition: lpsolution.h:43
Active< BaseType, CoType > * active()
Returns the active variables/constraints.
Active< BaseType, CoType > * active_
The active variables/constraints.
Definition: lpsolution.h:133
int idLp() const
Returns the Id of the LP in which the LP solution was generated.
const LpSolution< BaseType, CoType > & operator=(const LpSolution< BaseType, CoType > &rhs)
int nVarCon_
The number of variables/constraints.
Definition: lpsolution.h:128
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:130
Master * master_
A pointer to the corresponding master of the optimization.
Definition: lpsolution.h:126
int idSub() const
Returns the Id of the subproblem in which the LP solution was generated.