diff -r e4ec01f1a4cd -r 852361980706 lemon/lp_soplex.cc --- a/lemon/lp_soplex.cc Tue Apr 08 15:16:16 2008 +0000 +++ b/lemon/lp_soplex.cc Tue Apr 08 16:01:28 2008 +0000 @@ -36,16 +36,33 @@ LpSoplex::~LpSoplex() { delete soplex; } + + LpSoplex::LpSoplex(const LpSoplex& lp) : LpSolverBase() { + rows = lp.rows; + rows.setIdHandler(relocateIdHandler); + + cols = lp.cols; + cols.setIdHandler(relocateIdHandler); + + soplex = new soplex::SoPlex; + (*static_cast(soplex)) = *(lp.soplex); + + colNames = lp.colNames; + invColNames = lp.invColNames; + + primal_value = lp.primal_value; + dual_value = lp.dual_value; + + } - LpSolverBase &LpSoplex::_newLp() { + LpSolverBase* LpSoplex::_newLp() { LpSoplex* newlp = new LpSoplex(); - return *newlp; + return newlp; } - LpSolverBase &LpSoplex::_copyLp() { - LpSoplex* newlp = new LpSoplex(); - (*static_cast(newlp->soplex)) = *soplex; - return *newlp; + LpSolverBase* LpSoplex::_copyLp() { + LpSoplex* newlp = new LpSoplex(*this); + return newlp; } int LpSoplex::_addCol() {