| 682 | } |
| 683 | |
| 684 | void ReluConstraint::dump( String &output ) const |
| 685 | { |
| 686 | output = Stringf( "ReluConstraint: x%u = ReLU( x%u ). Active? %s. PhaseStatus = %u (%s).\n", |
| 687 | _f, |
| 688 | _b, |
| 689 | _constraintActive ? "Yes" : "No", |
| 690 | _phaseStatus, |
| 691 | phaseToString( _phaseStatus ).ascii() ); |
| 692 | |
| 693 | output += |
| 694 | Stringf( "b in [%s, %s], ", |
| 695 | existsLowerBound( _b ) ? Stringf( "%lf", getLowerBound( _b ) ).ascii() : "-inf", |
| 696 | existsUpperBound( _b ) ? Stringf( "%lf", getUpperBound( _b ) ).ascii() : "inf" ); |
| 697 | |
| 698 | output += |
| 699 | Stringf( "f in [%s, %s]", |
| 700 | existsLowerBound( _f ) ? Stringf( "%lf", getLowerBound( _f ) ).ascii() : "-inf", |
| 701 | existsUpperBound( _f ) ? Stringf( "%lf", getUpperBound( _f ) ).ascii() : "inf" ); |
| 702 | |
| 703 | if ( _auxVarInUse ) |
| 704 | { |
| 705 | output += Stringf( |
| 706 | ". Aux var: %u. Range: [%s, %s]\n", |
| 707 | _aux, |
| 708 | existsLowerBound( _aux ) ? Stringf( "%lf", getLowerBound( _aux ) ).ascii() : "-inf", |
| 709 | existsUpperBound( _aux ) ? Stringf( "%lf", getUpperBound( _aux ) ).ascii() : "inf" ); |
| 710 | } |
| 711 | } |
| 712 | |
| 713 | void ReluConstraint::updateVariableIndex( unsigned oldIndex, unsigned newIndex ) |
| 714 | { |