39 template <
class BaseType,
class CoType>
42 bool primalVariables, Active<BaseType, CoType> *active )
44 master_(sub->master_),
45 nVarCon_(primalVariables ? sub->nVar() : sub->nCon()),
48 zVal_(master_, nVarCon_)
53 active_ =
new Active<BaseType, CoType>(*active);
56 if(primalVariables==
true)
61 for(
int i = 0; i < nVarCon_; i++)
66 template <
class BaseType,
class CoType>
67 LpSolution<BaseType, CoType>::LpSolution(Master *master)
79 template <
class BaseType,
class CoType>
80 LpSolution<BaseType, CoType>::LpSolution(
const LpSolution<BaseType, CoType> &rhs)
83 nVarCon_(rhs.nVarCon_),
89 active_=
new Active<BaseType,CoType>(*rhs.active_);
93 template <
class BaseType,
class CoType>
94 LpSolution<BaseType, CoType>::~LpSolution()
100 template <
class BaseType,
class CoType>
101 std::ostream &
operator<<(std::ostream &os,
const LpSolution<BaseType, CoType> &rhs)
103 double machEps=rhs.master_->machineEps();
104 os << rhs.idSub_ <<
" ";
105 os << rhs.idLp_ <<
" ";
106 os << rhs.nVarCon_ <<
" ";
107 for(
int i = 0; i < rhs.nVarCon_; i++)
108 if(fabs(rhs.zVal_[i]) < machEps)
111 os << rhs.zVal_[i] <<
" " ;
117 template <
class BaseType,
class CoType>
118 int LpSolution<BaseType, CoType>::nVarCon()
const
124 template <
class BaseType,
class CoType>
125 double* LpSolution<BaseType, CoType>::zVal()
131 template <
class BaseType,
class CoType>
132 Active<BaseType, CoType> * LpSolution<BaseType, CoType>::active()
138 template <
class BaseType,
class CoType>
139 int LpSolution<BaseType, CoType>::idSub()
const
145 template <
class BaseType,
class CoType>
146 int LpSolution<BaseType, CoType>::idLp()
const