MCPcopy Create free account
hub / github.com/NeuralNetworkVerification/Marabou / satisfied

Method satisfied

src/engine/MaxConstraint.cpp:347–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347bool MaxConstraint::satisfied() const
348{
349 DEBUG( {
350 if ( !( existsAssignment( _f ) ) )
351 throw MarabouError( MarabouError::PARTICIPATING_VARIABLE_MISSING_ASSIGNMENT,
352 Stringf( "f(x%u) assignment missing.", _f ).ascii() );
353 for ( const auto &element : _elements )
354 if ( !( existsAssignment( element ) ) )
355 throw MarabouError( MarabouError::PARTICIPATING_VARIABLE_MISSING_ASSIGNMENT,
356 Stringf( "input(x%u) assignment missing.", element ).ascii() );
357 } );
358
359 double fValue = getAssignment( _f );
360 double maxValue = _maxValueOfEliminatedPhases;
361 for ( const auto &element : _elements )
362 {
363 double currentValue = getAssignment( element );
364 if ( FloatUtils::gt( currentValue, maxValue ) )
365 maxValue = currentValue;
366 }
367 return FloatUtils::areEqual( maxValue, fValue );
368}
369
370bool MaxConstraint::isCaseInfeasible( unsigned variable ) const
371{

Calls 3

MarabouErrorClass · 0.85
StringfClass · 0.85
asciiMethod · 0.80

Tested by

no test coverage detected