COIN-OR::LEMON - Graph Library

Changeset 1263:a490938ad0aa in lemon-0.x for src/work/athos/lp/lp_base.h


Ignore:
Timestamp:
03/25/05 17:19:03 (19 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1690
Message:
  • LpGlpk? added to the makefile
  • missing const_cast<>() added
  • prop for two new functions (solve() and solution())
File:
1 edited

Legend:

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

    r1259 r1263  
    101101  public:
    102102
     103    ///\e
     104    enum SolutionType {
     105      ///\e
     106      INFEASIBLE = 0,
     107      ///\e
     108      UNBOUNDED = 1,
     109      ///\e
     110      OPTIMAL = 2,
     111      ///\e
     112      FEASIBLE = 3,
     113    };
     114     
    103115    ///The floating point type used by the solver
    104116    typedef double Value;
     
    161173    _FixId cols;
    162174
    163     //MATRIX MANIPULATING FUNCTIONS
    164 
    165175    /// \e
    166176    virtual int _addCol() = 0;
     
    213223
    214224    ///\e
     225   
     226    ///\bug Wrong interface
     227    ///
     228    virtual SolutionType _solve() = 0;
     229
     230    ///\e
     231
     232    ///\bug Wrong interface
     233    ///
     234    virtual Value _getSolution(int i) = 0;
     235    ///\e
    215236
    216237    ///\bug unimplemented!!!!
     
    222243    virtual ~LpSolverBase() {}
    223244
     245    ///\name Building up and modification of the LP
     246
     247    ///@{
     248
    224249    ///Add a new empty column (i.e a new variable) to the LP
    225250    Col addCol() { Col c; c.id=cols.insert(_addCol()); return c;}
     251
    226252    ///\brief Fill the elements of a container with newly created columns
    227253    ///(i.e a new variables)
     
    262288    }
    263289#endif
     290
    264291    ///Add a new empty row (i.e a new constaint) to the LP
    265292
     
    349376        setObjCoeff((*i).first,(*i).second);
    350377    }
     378
     379    ///@}
     380
     381
     382    ///\name Solving the LP
     383
     384    ///@{
     385
     386    ///\e
     387    SolutionType solve() { return _solve(); }
     388   
     389    ///@}
     390   
     391    ///\name Obtaining the solution LP
     392
     393    ///@{
     394
     395    ///\e
     396    Value solution(Col c) { return _getSolution(cols.floatingId(c.id)); }
     397
     398    ///@}
    351399   
    352400  }; 
Note: See TracChangeset for help on using the changeset viewer.