1.1 --- a/lemon/lp_soplex.cc Tue Apr 08 15:16:16 2008 +0000
1.2 +++ b/lemon/lp_soplex.cc Tue Apr 08 16:01:28 2008 +0000
1.3 @@ -36,16 +36,33 @@
1.4 LpSoplex::~LpSoplex() {
1.5 delete soplex;
1.6 }
1.7 +
1.8 + LpSoplex::LpSoplex(const LpSoplex& lp) : LpSolverBase() {
1.9 + rows = lp.rows;
1.10 + rows.setIdHandler(relocateIdHandler);
1.11 +
1.12 + cols = lp.cols;
1.13 + cols.setIdHandler(relocateIdHandler);
1.14 +
1.15 + soplex = new soplex::SoPlex;
1.16 + (*static_cast<soplex::SPxLP*>(soplex)) = *(lp.soplex);
1.17 +
1.18 + colNames = lp.colNames;
1.19 + invColNames = lp.invColNames;
1.20 +
1.21 + primal_value = lp.primal_value;
1.22 + dual_value = lp.dual_value;
1.23 +
1.24 + }
1.25
1.26 - LpSolverBase &LpSoplex::_newLp() {
1.27 + LpSolverBase* LpSoplex::_newLp() {
1.28 LpSoplex* newlp = new LpSoplex();
1.29 - return *newlp;
1.30 + return newlp;
1.31 }
1.32
1.33 - LpSolverBase &LpSoplex::_copyLp() {
1.34 - LpSoplex* newlp = new LpSoplex();
1.35 - (*static_cast<soplex::SPxLP*>(newlp->soplex)) = *soplex;
1.36 - return *newlp;
1.37 + LpSolverBase* LpSoplex::_copyLp() {
1.38 + LpSoplex* newlp = new LpSoplex(*this);
1.39 + return newlp;
1.40 }
1.41
1.42 int LpSoplex::_addCol() {