lemon/lp_base.h
changeset 1787 932b8490caf0
parent 1771 5faaa9880d4d
child 1810 474d093466a5
     1.1 --- a/lemon/lp_base.h	Thu Nov 10 12:41:33 2005 +0000
     1.2 +++ b/lemon/lp_base.h	Sun Nov 13 20:01:17 2005 +0000
     1.3 @@ -36,6 +36,7 @@
     1.4    ///\todo This might be implemented to be also usable in other places.
     1.5    class _FixId 
     1.6    {
     1.7 +  protected:
     1.8      std::vector<int> index;
     1.9      std::vector<int> cross;
    1.10      int first_free;
    1.11 @@ -592,6 +593,7 @@
    1.12  //                          Value  const * values ) = 0;
    1.13      virtual SolveExitStatus _solve() = 0;
    1.14      virtual Value _getPrimal(int i) = 0;
    1.15 +    virtual Value _getDual(int i) = 0;
    1.16      virtual Value _getPrimalValue() = 0;
    1.17      virtual SolutionStatus _getPrimalStatus() = 0;
    1.18      virtual SolutionStatus _getDualStatus() = 0;
    1.19 @@ -708,7 +710,7 @@
    1.20        values.push_back(0);
    1.21        for(DualExpr::const_iterator i=e.begin(); i!=e.end(); ++i)
    1.22  	if((*i).second!=0) { ///\bug EPSILON would be necessary here!!!
    1.23 -	  indices.push_back(cols.floatingId((*i).first.id));
    1.24 +	  indices.push_back(rows.floatingId((*i).first.id));
    1.25  	  values.push_back((*i).second);
    1.26  	}
    1.27        _setColCoeffs(cols.floatingId(c.id),indices.size()-1,
    1.28 @@ -1001,6 +1003,9 @@
    1.29      Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); }
    1.30  
    1.31      ///\e
    1.32 +    Value dual(Row r) { return _getDual(rows.floatingId(r.id)); }
    1.33 +
    1.34 +    ///\e
    1.35  
    1.36      ///\return
    1.37      ///- \ref INF or -\ref INF means either infeasibility or unboundedness