| 317 | } |
| 318 | |
| 319 | void CostFunctionManager::dumpCostFunction() const |
| 320 | { |
| 321 | printf( "Cost function:\n\t" ); |
| 322 | |
| 323 | for ( unsigned i = 0; i < _n - _m; ++i ) |
| 324 | { |
| 325 | double coefficient = _costFunction[i]; |
| 326 | if ( FloatUtils::isZero( coefficient ) ) |
| 327 | continue; |
| 328 | |
| 329 | if ( FloatUtils::isPositive( coefficient ) ) |
| 330 | printf( "+" ); |
| 331 | printf( "%lfx%u ", coefficient, _tableau->nonBasicIndexToVariable( i ) ); |
| 332 | } |
| 333 | |
| 334 | printf( "\n" ); |
| 335 | } |
| 336 | |
| 337 | ICostFunctionManager::CostFunctionStatus CostFunctionManager::getCostFunctionStatus() const |
| 338 | { |
no test coverage detected