Functions _eraseRow(), _eraseCol(). Not yet implemented for cplex.
authorathos
Fri, 20 May 2005 09:43:40 +0000
changeset 143246b088b01f88
parent 1431 ad44b1dd8013
child 1433 e0ec5ce0771e
Functions _eraseRow(), _eraseCol(). Not yet implemented for cplex.
src/lemon/lp_cplex.cc
src/lemon/lp_cplex.h
src/lemon/lp_glpk.cc
src/lemon/lp_glpk.h
src/lemon/lp_skeleton.cc
src/lemon/lp_skeleton.h
     1.1 --- a/src/lemon/lp_cplex.cc	Fri May 20 09:31:25 2005 +0000
     1.2 +++ b/src/lemon/lp_cplex.cc	Fri May 20 09:43:40 2005 +0000
     1.3 @@ -95,6 +95,16 @@
     1.4      status = CPXnewrows (env, lp, 1, rhs, sense, NULL, NULL);
     1.5      return i;
     1.6    }
     1.7 +
     1.8 +
     1.9 +  void LpCplex::_eraseCol(int i) {
    1.10 +    ///\todo Not implemented yet
    1.11 +  }
    1.12 +  
    1.13 +  void LpCplex::_eraseRow(int i) {
    1.14 +    ///\todo Not implemented yet
    1.15 +  }
    1.16 +
    1.17    
    1.18    ///\warning Data at index 0 is ignored in the arrays.
    1.19    void LpCplex::_setRowCoeffs(int i, 
     2.1 --- a/src/lemon/lp_cplex.h	Fri May 20 09:31:25 2005 +0000
     2.2 +++ b/src/lemon/lp_cplex.h	Fri May 20 09:43:40 2005 +0000
     2.3 @@ -55,6 +55,8 @@
     2.4  
     2.5      virtual int _addCol();
     2.6      virtual int _addRow();
     2.7 +    virtual void _eraseCol(int i);
     2.8 +    virtual void _eraseRow(int i);
     2.9      virtual void _setRowCoeffs(int i, 
    2.10  			       int length,
    2.11                                 const int   * indices, 
     3.1 --- a/src/lemon/lp_glpk.cc	Fri May 20 09:31:25 2005 +0000
     3.2 +++ b/src/lemon/lp_glpk.cc	Fri May 20 09:43:40 2005 +0000
     3.3 @@ -68,6 +68,18 @@
     3.4    }
     3.5  
     3.6    
     3.7 +  void LpGlpk::_eraseCol(int i) {
     3.8 +    int cols[2];
     3.9 +    cols[1]=i;
    3.10 +    lpx_del_cols(lp, 1, cols);
    3.11 +  }
    3.12 +  
    3.13 +  void LpGlpk::_eraseRow(int i) {
    3.14 +    int rows[2];
    3.15 +    rows[1]=i;
    3.16 +    lpx_del_rows(lp, 1, rows);
    3.17 +  }
    3.18 +
    3.19    void LpGlpk::_setRowCoeffs(int i, 
    3.20  			     int length,
    3.21  			     const int   * indices, 
     4.1 --- a/src/lemon/lp_glpk.h	Fri May 20 09:31:25 2005 +0000
     4.2 +++ b/src/lemon/lp_glpk.h	Fri May 20 09:43:40 2005 +0000
     4.3 @@ -50,6 +50,9 @@
     4.4  
     4.5      virtual int _addCol();
     4.6      virtual int _addRow();
     4.7 +    virtual void _eraseCol(int i);
     4.8 +    virtual void _eraseRow(int i);
     4.9 +
    4.10      virtual void _setRowCoeffs(int i, 
    4.11  			       int length,
    4.12                                 const int   * indices, 
     5.1 --- a/src/lemon/lp_skeleton.cc	Fri May 20 09:31:25 2005 +0000
     5.2 +++ b/src/lemon/lp_skeleton.cc	Fri May 20 09:43:40 2005 +0000
     5.3 @@ -43,6 +43,12 @@
     5.4      return ++row_num;
     5.5    }
     5.6    
     5.7 +  void LpSkeleton::_eraseCol(int ) {
     5.8 +  }
     5.9 +  
    5.10 +  void LpSkeleton::_eraseRow(int) {
    5.11 +  }
    5.12 +
    5.13    void LpSkeleton::_setRowCoeffs(int, 
    5.14  				 int,
    5.15  				 int  const *, 
     6.1 --- a/src/lemon/lp_skeleton.h	Fri May 20 09:31:25 2005 +0000
     6.2 +++ b/src/lemon/lp_skeleton.h	Fri May 20 09:43:40 2005 +0000
     6.3 @@ -38,6 +38,10 @@
     6.4      /// \e
     6.5      virtual int _addRow();
     6.6      /// \e
     6.7 +    virtual void _eraseCol(int i);
     6.8 +    /// \e
     6.9 +    virtual void _eraseRow(int i);
    6.10 +    /// \e
    6.11  
    6.12      /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
    6.13      ///