Changeset 1323:3aaadfb7de3d in lemon0.x for src
 Timestamp:
 04/08/05 08:46:12 (15 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1762
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/lemon/lp_base.h
r1312 r1323 102 102 ///Common base class for LP solvers 103 103 class LpSolverBase { 104 104 105 105 public: 106 106 … … 376 376 _FixId cols; 377 377 378 //Abstract virtual functions 378 379 virtual int _addCol() = 0; 379 380 virtual int _addRow() = 0; … … 398 399 virtual void _setMin() = 0; 399 400 400 401 //Own protected stuff 402 403 //Constant component of the objective function 404 Value obj_const_comp; 405 406 ///\e 407 408 ///\bug Unimplemented 401 409 void clearObj() {} 410 402 411 public: 403 412 413 ///\e 414 LpSolverBase() : obj_const_comp(0) {} 404 415 405 416 ///\e … … 603 614 604 615 ///\param e is a linear expression of type \ref Expr. 605 ///\ todo What to do with the constant component?616 ///\bug The previous objective function is not cleared! 606 617 void setObj(Expr e) { 607 618 clearObj(); 608 619 for (Expr::iterator i=e.begin(); i!=e.end(); ++i) 609 620 objCoeff((*i).first,(*i).second); 621 obj_const_comp=e.constComp(); 610 622 } 611 623 … … 647 659 /// \ref NAN if no primal solution is found. 648 660 /// The (finite) objective value if an optimal solution is found. 649 Value primalValue() { return _getPrimalValue() ;}661 Value primalValue() { return _getPrimalValue()+obj_const_comp;} 650 662 ///@} 651 663
Note: See TracChangeset
for help on using the changeset viewer.