Changeset 2513:26983135fd6d in lemon-0.x
- Timestamp:
- 11/14/07 18:53:08 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3378
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/lp_base.h
r2495 r2513 1370 1370 ///\e 1371 1371 Value primal(Col c) const { return _getPrimal(_lpId(c)); } 1372 ///\e 1373 Value primal(const Expr& e) const { 1374 double res = e.constComp(); 1375 for (std::map<Col, double>::const_iterator it = e.begin(); 1376 it != e.end(); ++it) { 1377 res += _getPrimal(_lpId(it->first)) * it->second; 1378 } 1379 return res; 1380 } 1372 1381 1373 1382 ///\e 1374 1383 Value dual(Row r) const { return _getDual(_lpId(r)); } 1384 ///\e 1385 Value dual(const DualExpr& e) const { 1386 double res = 0.0; 1387 for (std::map<Row, double>::const_iterator it = e.begin(); 1388 it != e.end(); ++it) { 1389 res += _getPrimal(_lpId(it->first)) * it->second; 1390 } 1391 return res; 1392 } 1375 1393 1376 1394 ///\e
Note: See TracChangeset
for help on using the changeset viewer.