COIN-OR::LEMON - Graph Library

Changeset 1293:8ede2a6b2594 in lemon-0.x for src/work/athos/lp/lp_base.h


Ignore:
Timestamp:
04/01/05 21:50:29 (15 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1726
Message:
  • Make lp stuff compilable
  • Some 'set's removed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/athos/lp/lp_base.h

    r1291 r1293  
    106106
    107107    ///\e
    108     enum SolutionXXXType {
    109       ///\e
    110       INFEASIBLE = 0,
    111       ///\e
    112       UNBOUNDED = 1,
    113       ///\e
    114       OPTIMAL = 2,
    115       ///\e
    116       FEASIBLE = 3
     108    enum SolutionStatus {
     109      ///\e
     110      SOLVED = 0,
     111      ///\e
     112      UNSOLVED = 1
    117113    };
    118114     
     
    120116    enum SolutionType {
    121117      ///\e
    122       INFEASIBLE = 0,
    123       ///\e
    124       UNDEFINED = 1,
    125       ///\e
    126       OPTIMAL = 2,
    127       ///\e
    128       FEASIBLE = 3
     118      UNDEFINED = 0,
     119      ///\e
     120      INFEASIBLE = 1,
     121      ///\e
     122      FEASIBLE = 2,
     123      ///\e
     124      OPTIMAL = 3
    129125    };
    130126     
     
    419415    ///\bug Wrong interface
    420416    ///
    421     virtual SolutionXXXType _solve() = 0;
     417    virtual SolutionStatus _solve() = 0;
    422418
    423419    ///\e
     
    425421    ///\bug Wrong interface
    426422    ///
    427     virtual Value _getSolution(int i) = 0;
     423    virtual Value _getPrimal(int i) = 0;
    428424    ///\e
    429425
     
    576572    /// Set the lower bound of a column (i.e a variable)
    577573
    578     /// The upper bound of a variable (column) have to be given by an
     574    /// The upper bound of a variable (column) has to be given by an
    579575    /// extended number of type Value, i.e. a finite number of type
    580576    /// Value or -\ref INF.
    581     void setColLowerBound(Col c, Value value) {
     577    void colLowerBound(Col c, Value value) {
    582578      _setColLowerBound(cols.floatingId(c.id),value);
    583579    }
    584580    /// Set the upper bound of a column (i.e a variable)
    585581
    586     /// The upper bound of a variable (column) have to be given by an
     582    /// The upper bound of a variable (column) has to be given by an
    587583    /// extended number of type Value, i.e. a finite number of type
    588584    /// Value or \ref INF.
    589     void setColUpperBound(Col c, Value value) {
     585    void colUpperBound(Col c, Value value) {
    590586      _setColUpperBound(cols.floatingId(c.id),value);
    591587    };
     588    /// Set the lower and the upper bounds of a column (i.e a variable)
     589
     590    /// The lower and the upper bounds of
     591    /// a variable (column) have to be given by an
     592    /// extended number of type Value, i.e. a finite number of type
     593    /// Value, -\ref INF or \ref INF.
     594    void colBounds(Col c, Value lower, Value upper) {
     595      _setColLowerBound(cols.floatingId(c.id),lower);
     596      _setColUpperBound(cols.floatingId(c.id),upper);
     597    }
     598   
    592599    /// Set the lower bound of a row (i.e a constraint)
    593600
    594     /// The lower bound of a linear expression (row) have to be given by an
     601    /// The lower bound of a linear expression (row) has to be given by an
    595602    /// extended number of type Value, i.e. a finite number of type
    596603    /// Value or -\ref INF.
    597     void setRowLowerBound(Row r, Value value) {
     604    void rowLowerBound(Row r, Value value) {
    598605      _setRowLowerBound(rows.floatingId(r.id),value);
    599606    };
    600607    /// Set the upper bound of a row (i.e a constraint)
    601608
    602     /// The upper bound of a linear expression (row) have to be given by an
     609    /// The upper bound of a linear expression (row) has to be given by an
    603610    /// extended number of type Value, i.e. a finite number of type
    604611    /// Value or \ref INF.
    605     void setRowUpperBound(Row r, Value value) {
     612    void rowUpperBound(Row r, Value value) {
    606613      _setRowUpperBound(rows.floatingId(r.id),value);
    607614    };
     615    /// Set the lower and the upper bounds of a row (i.e a variable)
     616
     617    /// The lower and the upper bounds of
     618    /// a constraint (row) have to be given by an
     619    /// extended number of type Value, i.e. a finite number of type
     620    /// Value, -\ref INF or \ref INF.
     621    void rowBounds(Row c, Value lower, Value upper) {
     622      _setRowLowerBound(rows.floatingId(c.id),lower);
     623      _setRowUpperBound(rows.floatingId(c.id),upper);
     624    }
     625   
    608626    ///Set an element of the objective function
    609     void setObjCoeff(Col c, Value v) {_setObjCoeff(cols.floatingId(c.id),v); };
     627    void objCoeff(Col c, Value v) {_setObjCoeff(cols.floatingId(c.id),v); };
    610628    ///Set the objective function
    611629   
     
    615633      clearObj();
    616634      for (Expr::iterator i=e.begin(); i!=e.end(); ++i)
    617         setObjCoeff((*i).first,(*i).second);
     635        objCoeff((*i).first,(*i).second);
    618636    }
    619637
     
    626644
    627645    ///\e
    628     SolutionType solve() { return _solve(); }
     646    SolutionStatus solve() { return _solve(); }
    629647   
    630648    ///@}
     
    635653
    636654    ///\e
    637     Value solution(Col c) { return _getSolution(cols.floatingId(c.id)); }
     655    Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); }
    638656
    639657    ///@}
Note: See TracChangeset for help on using the changeset viewer.