| 295 | } |
| 296 | |
| 297 | void BoundExplainer::addVariable() |
| 298 | { |
| 299 | ++_numberOfRows; |
| 300 | ++_numberOfVariables; |
| 301 | |
| 302 | // Add a new explanation for the new variable |
| 303 | _trivialUpperBoundExplanation.append( new ( true ) CDO<bool>( &_context, true ) ); |
| 304 | _trivialLowerBoundExplanation.append( new ( true ) CDO<bool>( &_context, true ) ); |
| 305 | |
| 306 | _upperBoundExplanations.append( new ( true ) CDO<SparseUnsortedList>( &_context ) ); |
| 307 | _lowerBoundExplanations.append( new ( true ) CDO<SparseUnsortedList>( &_context ) ); |
| 308 | |
| 309 | |
| 310 | ASSERT( _upperBoundExplanations.size() == _numberOfVariables ); |
| 311 | ASSERT( _trivialUpperBoundExplanation.size() == _numberOfVariables ); |
| 312 | } |
| 313 | |
| 314 | void BoundExplainer::resetExplanation( unsigned var, bool isUpper ) |
| 315 | { |