lemon/lp_soplex.cc
changeset 2637 bafe730864da
parent 2553 bfced05fa852
equal deleted inserted replaced
7:069b3ed6f1ec 8:a53e18608ad9
    34   }
    34   }
    35   
    35   
    36   LpSoplex::~LpSoplex() {
    36   LpSoplex::~LpSoplex() {
    37     delete soplex;
    37     delete soplex;
    38   }
    38   }
    39   
    39 
    40   LpSolverBase &LpSoplex::_newLp() {
    40   LpSoplex::LpSoplex(const LpSoplex& lp) : LpSolverBase() {
       
    41     rows = lp.rows;
       
    42     rows.setIdHandler(relocateIdHandler);
       
    43 
       
    44     cols = lp.cols;
       
    45     cols.setIdHandler(relocateIdHandler);
       
    46 
       
    47     soplex = new soplex::SoPlex;
       
    48     (*static_cast<soplex::SPxLP*>(soplex)) = *(lp.soplex);
       
    49 
       
    50     colNames = lp.colNames;
       
    51     invColNames = lp.invColNames;
       
    52 
       
    53     primal_value = lp.primal_value;
       
    54     dual_value = lp.dual_value;
       
    55 
       
    56   }
       
    57   
       
    58   LpSolverBase* LpSoplex::_newLp() {
    41     LpSoplex* newlp = new LpSoplex();
    59     LpSoplex* newlp = new LpSoplex();
    42     return *newlp;
    60     return newlp;
    43   }
    61   }
    44 
    62 
    45   LpSolverBase &LpSoplex::_copyLp() {
    63   LpSolverBase* LpSoplex::_copyLp() {
    46     LpSoplex* newlp = new LpSoplex();
    64     LpSoplex* newlp = new LpSoplex(*this);
    47     (*static_cast<soplex::SPxLP*>(newlp->soplex)) = *soplex;
    65     return newlp;
    48     return *newlp;
       
    49   }
    66   }
    50 
    67 
    51   int LpSoplex::_addCol() {
    68   int LpSoplex::_addCol() {
    52     soplex::LPCol c;
    69     soplex::LPCol c;
    53     c.setLower(-soplex::infinity);
    70     c.setLower(-soplex::infinity);