1.1 --- a/lemon/lp_soplex.cc Thu Feb 15 14:22:08 2007 +0000
1.2 +++ b/lemon/lp_soplex.cc Thu Feb 15 19:15:14 2007 +0000
1.3 @@ -99,25 +99,41 @@
1.4 }
1.5
1.6
1.7 - void LpSoplex::_setRowCoeffs(int i, LpRowIterator b, LpRowIterator e) {
1.8 + void LpSoplex::_setRowCoeffs(int i, ConstRowIterator b, ConstRowIterator e) {
1.9 for (int j = 0; j < soplex->nCols(); ++j) {
1.10 soplex->changeElement(i, j, 0.0);
1.11 }
1.12 - for(LpRowIterator it = b; it != e; ++it) {
1.13 + for(ConstRowIterator it = b; it != e; ++it) {
1.14 soplex->changeElement(i, it->first, it->second);
1.15 }
1.16 solved = false;
1.17 }
1.18 +
1.19 + void LpSoplex::_getRowCoeffs(int i, RowIterator b) {
1.20 + const soplex::SVector& vec = soplex->rowVector(i);
1.21 + for (int k = 0; k < vec.size(); ++k) {
1.22 + *b = std::make_pair(vec.index(k), vec.value(k));
1.23 + ++b;
1.24 + }
1.25 + }
1.26
1.27 - void LpSoplex::_setColCoeffs(int j, LpColIterator b, LpColIterator e) {
1.28 + void LpSoplex::_setColCoeffs(int j, ConstColIterator b, ConstColIterator e) {
1.29 for (int i = 0; i < soplex->nRows(); ++i) {
1.30 soplex->changeElement(i, j, 0.0);
1.31 }
1.32 - for(LpColIterator it = b; it != e; ++it) {
1.33 + for(ConstColIterator it = b; it != e; ++it) {
1.34 soplex->changeElement(it->first, j, it->second);
1.35 }
1.36 solved = false;
1.37 }
1.38 +
1.39 + void LpSoplex::_getColCoeffs(int i, ColIterator b) {
1.40 + const soplex::SVector& vec = soplex->colVector(i);
1.41 + for (int k = 0; k < vec.size(); ++k) {
1.42 + *b = std::make_pair(vec.index(k), vec.value(k));
1.43 + ++b;
1.44 + }
1.45 + }
1.46
1.47 void LpSoplex::_setCoeff(int i, int j, Value value) {
1.48 soplex->changeElement(i, j, value);