| 1344 | } |
| 1345 | |
| 1346 | void Engine::initializeTableau( const double *constraintMatrix, const List<unsigned> &initialBasis ) |
| 1347 | { |
| 1348 | const List<Equation> &equations( _preprocessedQuery->getEquations() ); |
| 1349 | unsigned m = equations.size(); |
| 1350 | unsigned n = _preprocessedQuery->getNumberOfVariables(); |
| 1351 | |
| 1352 | _tableau->setDimensions( m, n ); |
| 1353 | |
| 1354 | adjustWorkMemorySize(); |
| 1355 | |
| 1356 | unsigned equationIndex = 0; |
| 1357 | for ( const auto &equation : equations ) |
| 1358 | { |
| 1359 | _tableau->setRightHandSide( equationIndex, equation._scalar ); |
| 1360 | ++equationIndex; |
| 1361 | } |
| 1362 | |
| 1363 | // Populate constriant matrix |
| 1364 | _tableau->setConstraintMatrix( constraintMatrix ); |
| 1365 | |
| 1366 | _tableau->registerToWatchAllVariables( _rowBoundTightener ); |
| 1367 | _tableau->registerResizeWatcher( _rowBoundTightener ); |
| 1368 | |
| 1369 | _rowBoundTightener->setDimensions(); |
| 1370 | |
| 1371 | initializeBoundsAndConstraintWatchersInTableau( n ); |
| 1372 | |
| 1373 | _tableau->initializeTableau( initialBasis ); |
| 1374 | |
| 1375 | _costFunctionManager->initialize(); |
| 1376 | _tableau->registerCostFunctionManager( _costFunctionManager ); |
| 1377 | _activeEntryStrategy->initialize( _tableau ); |
| 1378 | } |
| 1379 | |
| 1380 | void Engine::initializeBoundsAndConstraintWatchersInTableau( unsigned numberOfVariables ) |
| 1381 | { |
no test coverage detected