1.1 --- a/src/work/athos/lp/lp_base.h Fri Apr 01 19:50:29 2005 +0000
1.2 +++ b/src/work/athos/lp/lp_base.h Sun Apr 03 10:20:49 2005 +0000
1.3 @@ -361,69 +361,26 @@
1.4 _FixId rows;
1.5 _FixId cols;
1.6
1.7 - /// \e
1.8 virtual int _addCol() = 0;
1.9 - /// \e
1.10 virtual int _addRow() = 0;
1.11 - /// \e
1.12 -
1.13 - /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
1.14 - ///
1.15 virtual void _setRowCoeffs(int i,
1.16 int length,
1.17 int const * indices,
1.18 Value const * values ) = 0;
1.19 - /// \e
1.20 -
1.21 - /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)
1.22 - ///
1.23 virtual void _setColCoeffs(int i,
1.24 int length,
1.25 int const * indices,
1.26 Value const * values ) = 0;
1.27 -
1.28 - /// \e
1.29 + virtual void _setColLowerBound(int i, Value value) = 0;
1.30 + virtual void _setColUpperBound(int i, Value value) = 0;
1.31 + virtual void _setRowLowerBound(int i, Value value) = 0;
1.32 + virtual void _setRowUpperBound(int i, Value value) = 0;
1.33 + virtual void _setObjCoeff(int i, Value obj_coef) = 0;
1.34 + virtual SolutionStatus _solve() = 0;
1.35 + virtual Value _getPrimal(int i) = 0;
1.36 + virtual SolutionType _getPrimalType() = 0;
1.37
1.38 - /// The lower bound of a variable (column) have to be given by an
1.39 - /// extended number of type Value, i.e. a finite number of type
1.40 - /// Value or -\ref INF.
1.41 - virtual void _setColLowerBound(int i, Value value) = 0;
1.42 - /// \e
1.43
1.44 - /// The upper bound of a variable (column) have to be given by an
1.45 - /// extended number of type Value, i.e. a finite number of type
1.46 - /// Value or \ref INF.
1.47 - virtual void _setColUpperBound(int i, Value value) = 0;
1.48 - /// \e
1.49 -
1.50 - /// The lower bound of a linear expression (row) have to be given by an
1.51 - /// extended number of type Value, i.e. a finite number of type
1.52 - /// Value or -\ref INF.
1.53 - virtual void _setRowLowerBound(int i, Value value) = 0;
1.54 - /// \e
1.55 -
1.56 - /// The upper bound of a linear expression (row) have to be given by an
1.57 - /// extended number of type Value, i.e. a finite number of type
1.58 - /// Value or \ref INF.
1.59 - virtual void _setRowUpperBound(int i, Value value) = 0;
1.60 -
1.61 - /// \e
1.62 - virtual void _setObjCoeff(int i, Value obj_coef) = 0;
1.63 -
1.64 - ///\e
1.65 -
1.66 - ///\bug Wrong interface
1.67 - ///
1.68 - virtual SolutionStatus _solve() = 0;
1.69 -
1.70 - ///\e
1.71 -
1.72 - ///\bug Wrong interface
1.73 - ///
1.74 - virtual Value _getPrimal(int i) = 0;
1.75 - ///\e
1.76 -
1.77 - ///\bug unimplemented!!!!
1.78 void clearObj() {}
1.79 public:
1.80
1.81 @@ -431,15 +388,15 @@
1.82 ///\e
1.83 virtual ~LpSolverBase() {}
1.84
1.85 - ///\name Building up and modification of the LP
1.86 + ///\name Build up and modify of the LP
1.87
1.88 ///@{
1.89
1.90 ///Add a new empty column (i.e a new variable) to the LP
1.91 Col addCol() { Col c; c.id=cols.insert(_addCol()); return c;}
1.92
1.93 - ///\brief Fill the elements of a container with newly created columns
1.94 - ///(i.e a new variables)
1.95 + ///\brief Adds several new columns
1.96 + ///(i.e a variables) at once
1.97 ///
1.98 ///This magic function takes a container as its argument
1.99 ///and fills its elements
1.100 @@ -638,7 +595,7 @@
1.101 ///@}
1.102
1.103
1.104 - ///\name Solving the LP
1.105 + ///\name Solve the LP
1.106
1.107 ///@{
1.108
1.109 @@ -647,11 +604,16 @@
1.110
1.111 ///@}
1.112
1.113 - ///\name Obtaining the solution LP
1.114 + ///\name Obtain the solution
1.115
1.116 ///@{
1.117
1.118 ///\e
1.119 + SolutionType primalType() {
1.120 + return _getPrimalType();
1.121 + }
1.122 +
1.123 + ///\e
1.124 Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); }
1.125
1.126 ///@}