Changeset 1294:2dec219d9ca2 in lemon-0.x for src/work
- Timestamp:
- 04/03/05 12:20:49 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1727
- Location:
- src/work/athos/lp
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/athos/lp/lp_base.h
r1293 r1294 362 362 _FixId cols; 363 363 364 /// \e365 364 virtual int _addCol() = 0; 366 /// \e367 365 virtual int _addRow() = 0; 368 /// \e369 370 /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)371 ///372 366 virtual void _setRowCoeffs(int i, 373 367 int length, 374 368 int const * indices, 375 369 Value const * values ) = 0; 376 /// \e377 378 /// \warning Arrays are indexed from 1 (datum at index 0 is ignored)379 ///380 370 virtual void _setColCoeffs(int i, 381 371 int length, 382 372 int const * indices, 383 373 Value const * values ) = 0; 384 385 /// \e386 387 /// The lower bound of a variable (column) have to be given by an388 /// extended number of type Value, i.e. a finite number of type389 /// Value or -\ref INF.390 374 virtual void _setColLowerBound(int i, Value value) = 0; 391 /// \e392 393 /// The upper bound of a variable (column) have to be given by an394 /// extended number of type Value, i.e. a finite number of type395 /// Value or \ref INF.396 375 virtual void _setColUpperBound(int i, Value value) = 0; 397 /// \e398 399 /// The lower bound of a linear expression (row) have to be given by an400 /// extended number of type Value, i.e. a finite number of type401 /// Value or -\ref INF.402 376 virtual void _setRowLowerBound(int i, Value value) = 0; 403 /// \e404 405 /// The upper bound of a linear expression (row) have to be given by an406 /// extended number of type Value, i.e. a finite number of type407 /// Value or \ref INF.408 377 virtual void _setRowUpperBound(int i, Value value) = 0; 409 410 /// \e411 378 virtual void _setObjCoeff(int i, Value obj_coef) = 0; 412 413 ///\e414 415 ///\bug Wrong interface416 ///417 379 virtual SolutionStatus _solve() = 0; 418 419 ///\e420 421 ///\bug Wrong interface422 ///423 380 virtual Value _getPrimal(int i) = 0; 424 ///\e425 426 ///\bug unimplemented!!!! 381 virtual SolutionType _getPrimalType() = 0; 382 383 427 384 void clearObj() {} 428 385 public: … … 432 389 virtual ~LpSolverBase() {} 433 390 434 ///\name Build ing up and modificationof the LP391 ///\name Build up and modify of the LP 435 392 436 393 ///@{ … … 439 396 Col addCol() { Col c; c.id=cols.insert(_addCol()); return c;} 440 397 441 ///\brief Fill the elements of a container with newly createdcolumns442 ///(i.e a new variables)398 ///\brief Adds several new columns 399 ///(i.e a variables) at once 443 400 /// 444 401 ///This magic function takes a container as its argument … … 639 596 640 597 641 ///\name Solv ingthe LP598 ///\name Solve the LP 642 599 643 600 ///@{ … … 648 605 ///@} 649 606 650 ///\name Obtain ing the solution LP607 ///\name Obtain the solution 651 608 652 609 ///@{ 610 611 ///\e 612 SolutionType primalType() { 613 return _getPrimalType(); 614 } 653 615 654 616 ///\e -
src/work/athos/lp/lp_glpk.cc
r1293 r1294 249 249 } 250 250 251 LpGlpk::SolutionType LpGlpk::_getPrimalType() 252 { 253 return OPTIMAL; 254 } 255 251 256 252 257 -
src/work/athos/lp/lp_glpk.h
r1293 r1294 77 77 /// 78 78 virtual Value _getPrimal(int i); 79 ///\e 80 81 ///\bug Unimplemented 82 /// 83 virtual SolutionType _getPrimalType(); 79 84 80 85 }; -
src/work/athos/lp/lp_solver_skeleton.cc
r1293 r1294 76 76 } 77 77 78 LpSolverSkeleton::SolutionType LpSolverSkeleton::_getPrimalType() 79 { 80 return OPTIMAL; 81 } 82 78 83 } //namespace lemon 79 84 -
src/work/athos/lp/lp_solver_skeleton.h
r1293 r1294 30 30 31 31 protected: 32 /// \e 32 33 virtual int _addCol(); 34 /// \e 33 35 virtual int _addRow(); 36 /// \e 37 38 /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) 39 /// 34 40 virtual void _setRowCoeffs(int i, 35 41 int length, 36 42 int const * indices, 37 43 Value const * values ); 44 /// \e 45 46 /// \warning Arrays are indexed from 1 (datum at index 0 is ignored) 47 /// 38 48 virtual void _setColCoeffs(int i, 39 49 int length, 40 50 int const * indices, 41 Value const * values); 51 Value const * values ); 52 53 /// \e 54 55 /// The lower bound of a variable (column) have to be given by an 56 /// extended number of type Value, i.e. a finite number of type 57 /// Value or -\ref INF. 42 58 virtual void _setColLowerBound(int i, Value value); 59 /// \e 60 61 /// The upper bound of a variable (column) have to be given by an 62 /// extended number of type Value, i.e. a finite number of type 63 /// Value or \ref INF. 43 64 virtual void _setColUpperBound(int i, Value value); 65 /// \e 66 67 /// The lower bound of a linear expression (row) have to be given by an 68 /// extended number of type Value, i.e. a finite number of type 69 /// Value or -\ref INF. 44 70 virtual void _setRowLowerBound(int i, Value value); 71 /// \e 72 73 /// The upper bound of a linear expression (row) have to be given by an 74 /// extended number of type Value, i.e. a finite number of type 75 /// Value or \ref INF. 45 76 virtual void _setRowUpperBound(int i, Value value); 77 78 /// \e 46 79 virtual void _setObjCoeff(int i, Value obj_coef); 80 81 ///\e 82 83 ///\bug Wrong interface 84 /// 47 85 virtual SolutionStatus _solve(); 86 87 ///\e 88 89 ///\bug Wrong interface 90 /// 48 91 virtual Value _getPrimal(int i); 92 ///\e 93 94 ///\bug Wrong interface 95 /// 96 virtual SolutionType _getPrimalType(); 97 49 98 public: 50 99 LpSolverSkeleton() : LpSolverBase(), col_num(0), row_num(0) {}
Note: See TracChangeset
for help on using the changeset viewer.