Changeset 1312:48f9299b390d in lemon-0.x
- Timestamp:
- 04/07/05 08:31:03 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1751
- Location:
- src/lemon
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/lp_base.h
r1305 r1312 393 393 virtual SolveExitStatus _solve() = 0; 394 394 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 397 400 398 401 void clearObj() {} … … 428 431 ///like 429 432 ///\code 430 ///std::map<Any Type,LpSolverBase::Col>433 ///std::map<AnyStatus,LpSolverBase::Col> 431 434 ///\endcode 432 435 ///- an iterable lemon \ref concept::WriteMap "write map" like … … 607 610 } 608 611 612 ///Maximize 613 void max() { _setMax(); } 614 ///Minimize 615 void min() { _setMin(); } 616 617 609 618 ///@} 610 619 … … 624 633 625 634 ///\e 626 SolutionStatus primal Type() {627 return _getPrimal Type();635 SolutionStatus primalStatus() { 636 return _getPrimalStatus(); 628 637 } 629 638 … … 631 640 Value primal(Col c) { return _getPrimal(cols.floatingId(c.id)); } 632 641 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();} 633 650 ///@} 634 651 -
src/lemon/lp_glpk.cc
r1305 r1312 256 256 } 257 257 258 LpGlpk::Value LpGlpk::_getPrimalValue() 259 { 260 return 0; 261 } 262 258 263 259 LpGlpk::SolutionStatus LpGlpk::_getPrimal Type()264 LpGlpk::SolutionStatus LpGlpk::_getPrimalStatus() 260 265 { 261 266 int stat= lpx_get_status(lp); … … 284 289 285 290 291 void LpGlpk::_setMax() 292 { 293 } 294 void LpGlpk::_setMin() 295 { 296 } 297 298 286 299 } //END OF NAMESPACE LEMON 287 300 -
src/lemon/lp_glpk.h
r1305 r1312 81 81 ///\bug Unimplemented 82 82 /// 83 virtual SolutionStatus _getPrimalType(); 83 virtual Value _getPrimalValue(); 84 ///\e 85 86 ///\bug Unimplemented 87 /// 88 virtual SolutionStatus _getPrimalStatus(); 84 89 90 ///\e 91 92 ///\bug Unimplemented 93 /// 94 virtual void _setMax(); 95 ///\e 96 97 ///\bug Unimplemented 98 /// 99 virtual void _setMin(); 100 85 101 }; 86 102 } //END OF NAMESPACE LEMON -
src/lemon/lp_solver_skeleton.cc
r1305 r1312 66 66 } 67 67 68 void LpSolverSkeleton::_setMax() 69 { 70 } 71 void LpSolverSkeleton::_setMin() 72 { 73 } 74 68 75 LpSolverSkeleton::SolveExitStatus LpSolverSkeleton::_solve() 69 76 { … … 76 83 } 77 84 78 LpSolverSkeleton::SolutionStatus LpSolverSkeleton::_getPrimalType() 85 LpSolverSkeleton::Value LpSolverSkeleton::_getPrimalValue() 86 { 87 return 0; 88 } 89 90 LpSolverSkeleton::SolutionStatus LpSolverSkeleton::_getPrimalStatus() 79 91 { 80 92 return OPTIMAL; -
src/lemon/lp_solver_skeleton.h
r1305 r1312 94 94 ///\bug Wrong interface 95 95 /// 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 97 108 98 109 public:
Note: See TracChangeset
for help on using the changeset viewer.