diff -r 596e48d6e77b -r b4931ae52069 lemon/lp_base.h --- a/lemon/lp_base.h Mon Dec 04 18:09:09 2006 +0000 +++ b/lemon/lp_base.h Thu Dec 07 16:10:54 2006 +0000 @@ -706,10 +706,14 @@ virtual Value _getCoeff(int row, int col) = 0; virtual void _setColLowerBound(int i, Value value) = 0; + virtual Value _getColLowerBound(int i) = 0; virtual void _setColUpperBound(int i, Value value) = 0; + virtual Value _getColUpperBound(int i) = 0; // virtual void _setRowLowerBound(int i, Value value) = 0; // virtual void _setRowUpperBound(int i, Value value) = 0; virtual void _setRowBounds(int i, Value lower, Value upper) = 0; + virtual void _getRowBounds(int i, Value &lower, Value &upper)=0; + virtual void _setObjCoeff(int i, Value obj_coef) = 0; virtual Value _getObjCoeff(int i) = 0; virtual void _clearObj()=0; @@ -1024,6 +1028,15 @@ void colLowerBound(Col c, Value value) { _setColLowerBound(_lpId(c),value); } + + /// Get the lower bound of a column (i.e a variable) + + /// This function returns the lower bound for column (variable) \t c + /// (this might be -\ref INF as well). + ///\return The lower bound for coloumn \t c + Value colLowerBound(Col c) { + return _getColLowerBound(_lpId(c)); + } ///\brief Set the lower bound of several columns ///(i.e a variables) at once @@ -1071,7 +1084,16 @@ _setColUpperBound(_lpId(c),value); }; - ///\brief Set the lower bound of several columns + /// Get the upper bound of a column (i.e a variable) + + /// This function returns the upper bound for column (variable) \t c + /// (this might be \ref INF as well). + ///\return The upper bound for coloumn \t c + Value colUpperBound(Col c) { + return _getColUpperBound(_lpId(c)); + } + + ///\brief Set the upper bound of several columns ///(i.e a variables) at once /// ///This magic function takes a container as its argument @@ -1176,15 +1198,30 @@ /// Set the lower and the upper bounds of a row (i.e a constraint) - /// The lower and the upper bounds of + /// The lower and the upper bound of /// a constraint (row) have to be given by an /// extended number of type Value, i.e. a finite number of type - /// Value, -\ref INF or \ref INF. + /// Value, -\ref INF or \ref INF. There is no separate function for the + /// lower and the upper bound because that would have been hard to implement + /// for CPLEX. void rowBounds(Row c, Value lower, Value upper) { _setRowBounds(_lpId(c),lower, upper); - // _setRowUpperBound(_lpId(c),upper); } + /// Get the lower and the upper bounds of a row (i.e a constraint) + + /// The lower and the upper bound of + /// a constraint (row) are + /// extended numbers of type Value, i.e. finite numbers of type + /// Value, -\ref INF or \ref INF. + /// \todo There is no separate function for the + /// lower and the upper bound because we had problems with the + /// implementation of the setting functions for CPLEX: + /// check out whether this can be done for these functions. + void getRowBounds(Row c, Value &lower, Value &upper) { + _getRowBounds(_lpId(c),lower, upper); + } + ///Set an element of the objective function void objCoeff(Col c, Value v) {_setObjCoeff(_lpId(c),v); };