COIN-OR::LEMON - Graph Library

Changeset 1312:48f9299b390d in lemon-0.x


Ignore:
Timestamp:
04/07/05 08:31:03 (15 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1751
Message:

max() [_setMax()], min() [_setMin()], primalValue() [_getPrimalValue()] added

Location:
src/lemon
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/lp_base.h

    r1305 r1312  
    393393    virtual SolveExitStatus _solve() = 0;
    394394    virtual Value _getPrimal(int i) = 0;
    395     virtual SolutionStatus _getPrimalType() = 0;
    396 
     395    virtual Value _getPrimalValue() = 0;
     396    virtual SolutionStatus _getPrimalStatus() = 0;
     397    virtual void _setMax() = 0;
     398    virtual void _setMin() = 0;
     399   
    397400
    398401    void clearObj() {}
     
    428431    ///like
    429432    ///\code
    430     ///std::map<AnyType,LpSolverBase::Col>
     433    ///std::map<AnyStatus,LpSolverBase::Col>
    431434    ///\endcode
    432435    ///- an iterable lemon \ref concept::WriteMap "write map" like
     
    607610    }
    608611
     612    ///Maximize
     613    void max() { _setMax(); }
     614    ///Minimize
     615    void min() { _setMin(); }
     616
     617   
    609618    ///@}
    610619
     
    624633
    625634    ///\e
    626     SolutionStatus primalType() {
    627       return _getPrimalType();
     635    SolutionStatus primalStatus() {
     636      return _getPrimalStatus();
    628637    }
    629638
     
    631640    Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); }
    632641
     642    ///\e
     643
     644    ///\return
     645    ///- \ref INF or -\ref INF means either infeasibility or unboundedness
     646    /// of the primal problem, depending on whether we minimize or maximize.
     647    ///- \ref NAN if no primal solution is found.
     648    ///- The (finite) objective value if an optimal solution is found.
     649    Value primalValue() { return _getPrimalValue();}
    633650    ///@}
    634651   
  • src/lemon/lp_glpk.cc

    r1305 r1312  
    256256  }
    257257 
     258  LpGlpk::Value LpGlpk::_getPrimalValue()
     259  {
     260    return 0;
     261  }
     262 
    258263 
    259   LpGlpk::SolutionStatus LpGlpk::_getPrimalType()
     264  LpGlpk::SolutionStatus LpGlpk::_getPrimalStatus()
    260265  {
    261266    int stat=  lpx_get_status(lp);
     
    284289
    285290
     291  void LpGlpk::_setMax()
     292  {
     293  }
     294  void LpGlpk::_setMin()
     295  {
     296  }
     297
     298 
    286299} //END OF NAMESPACE LEMON
    287300
  • src/lemon/lp_glpk.h

    r1305 r1312  
    8181    ///\bug Unimplemented
    8282    ///
    83     virtual SolutionStatus _getPrimalType();
     83    virtual Value _getPrimalValue();
     84    ///\e
     85   
     86    ///\bug Unimplemented
     87    ///
     88    virtual SolutionStatus _getPrimalStatus();
    8489
     90    ///\e
     91   
     92    ///\bug Unimplemented
     93    ///
     94    virtual void _setMax();
     95    ///\e
     96   
     97    ///\bug Unimplemented
     98    ///
     99    virtual void _setMin();
     100 
    85101  };
    86102} //END OF NAMESPACE LEMON
  • src/lemon/lp_solver_skeleton.cc

    r1305 r1312  
    6666  }
    6767
     68  void LpSolverSkeleton::_setMax()
     69  {
     70  }
     71  void LpSolverSkeleton::_setMin()
     72  {
     73  }
     74
    6875  LpSolverSkeleton::SolveExitStatus LpSolverSkeleton::_solve()
    6976  {
     
    7683  }
    7784 
    78   LpSolverSkeleton::SolutionStatus LpSolverSkeleton::_getPrimalType()
     85  LpSolverSkeleton::Value LpSolverSkeleton::_getPrimalValue()
     86  {
     87    return 0;
     88  }
     89 
     90  LpSolverSkeleton::SolutionStatus LpSolverSkeleton::_getPrimalStatus()
    7991  {
    8092    return OPTIMAL;
  • src/lemon/lp_solver_skeleton.h

    r1305 r1312  
    9494    ///\bug Wrong interface
    9595    ///
    96     virtual SolutionStatus _getPrimalType();
     96    virtual Value _getPrimalValue();
     97    ///\e
     98
     99    ///\bug Wrong interface
     100    ///
     101    virtual SolutionStatus _getPrimalStatus();
     102
     103    ///\e
     104    virtual void _setMax();
     105    ///\e
     106    virtual void _setMin();
     107   
    97108
    98109  public:
Note: See TracChangeset for help on using the changeset viewer.