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

Method dump

src/engine/LeakyReluConstraint.cpp:546–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

544}
545
546void LeakyReluConstraint::dump( String &output ) const
547{
548 output = Stringf( "LeakyReluConstraint: x%u = LeakyReLU( x%u ), slope = %lf. Active? %s. "
549 "PhaseStatus = %u (%s).\n",
550 _f,
551 _b,
552 _slope,
553 _constraintActive ? "Yes" : "No",
554 _phaseStatus,
555 phaseToString( _phaseStatus ).ascii() );
556
557 output +=
558 Stringf( "b in [%s, %s], ",
559 existsLowerBound( _b ) ? Stringf( "%lf", getLowerBound( _b ) ).ascii() : "-inf",
560 existsUpperBound( _b ) ? Stringf( "%lf", getUpperBound( _b ) ).ascii() : "inf" );
561
562 output +=
563 Stringf( "f in [%s, %s]",
564 existsLowerBound( _f ) ? Stringf( "%lf", getLowerBound( _f ) ).ascii() : "-inf",
565 existsUpperBound( _f ) ? Stringf( "%lf", getUpperBound( _f ) ).ascii() : "inf" );
566
567 if ( _auxVarsInUse )
568 {
569 output += Stringf(
570 ". Active aux var: %u. Range: [%s, %s]\n",
571 _activeAux,
572 existsLowerBound( _activeAux ) ? Stringf( "%lf", getLowerBound( _activeAux ) ).ascii()
573 : "-inf",
574 existsUpperBound( _activeAux ) ? Stringf( "%lf", getUpperBound( _activeAux ) ).ascii()
575 : "inf" );
576 output += Stringf( ". Inactive aux var: %u. Range: [%s, %s]\n",
577 _inactiveAux,
578 existsLowerBound( _inactiveAux )
579 ? Stringf( "%lf", getLowerBound( _inactiveAux ) ).ascii()
580 : "-inf",
581 existsUpperBound( _inactiveAux )
582 ? Stringf( "%lf", getUpperBound( _inactiveAux ) ).ascii()
583 : "inf" );
584 }
585}
586
587void LeakyReluConstraint::updateVariableIndex( unsigned oldIndex, unsigned newIndex )
588{

Callers

nothing calls this directly

Calls 2

StringfClass · 0.85
asciiMethod · 0.80

Tested by

no test coverage detected