| 436 | } |
| 437 | |
| 438 | PiecewiseLinearCaseSplit MaxConstraint::getCaseSplit( PhaseStatus phase ) const |
| 439 | { |
| 440 | if ( phase == MAX_PHASE_ELIMINATED ) |
| 441 | { |
| 442 | PiecewiseLinearCaseSplit eliminatedPhase; |
| 443 | eliminatedPhase.storeBoundTightening( |
| 444 | Tightening( _f, _maxValueOfEliminatedPhases, Tightening::LB ) ); |
| 445 | eliminatedPhase.storeBoundTightening( |
| 446 | Tightening( _f, _maxValueOfEliminatedPhases, Tightening::UB ) ); |
| 447 | return eliminatedPhase; |
| 448 | } |
| 449 | else |
| 450 | { |
| 451 | unsigned argMax = phaseToVariable( phase ); |
| 452 | PiecewiseLinearCaseSplit maxPhase; |
| 453 | |
| 454 | if ( argMax != _f ) |
| 455 | { |
| 456 | // We had f - argMax = aux and |
| 457 | maxPhase.storeBoundTightening( Tightening( _elementToAux[argMax], 0, Tightening::UB ) ); |
| 458 | } |
| 459 | return maxPhase; |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | void MaxConstraint::updateVariableIndex( unsigned oldIndex, unsigned newIndex ) |
| 464 | { |
no test coverage detected