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

Method removeRedundantEquations

src/engine/Engine.cpp:1107–1129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1105}
1106
1107void Engine::removeRedundantEquations( const double *constraintMatrix )
1108{
1109 const List<Equation> &equations( _preprocessedQuery->getEquations() );
1110 unsigned m = equations.size();
1111 unsigned n = _preprocessedQuery->getNumberOfVariables();
1112
1113 // Step 1: analyze the matrix to identify redundant rows
1114 AutoConstraintMatrixAnalyzer analyzer;
1115 analyzer->analyze( constraintMatrix, m, n );
1116
1117 ENGINE_LOG(
1118 Stringf( "Number of redundant rows: %u out of %u", analyzer->getRedundantRows().size(), m )
1119 .ascii() );
1120
1121 // Step 2: remove any equations corresponding to redundant rows
1122 Set<unsigned> redundantRows = analyzer->getRedundantRows();
1123
1124 if ( !redundantRows.empty() )
1125 {
1126 _preprocessedQuery->removeEquationsByIndex( redundantRows );
1127 m = equations.size();
1128 }
1129}
1130
1131void Engine::selectInitialVariablesForBasis( const double *constraintMatrix,
1132 List<unsigned> &initialBasis,

Callers

nothing calls this directly

Calls 8

StringfClass · 0.85
asciiMethod · 0.80
sizeMethod · 0.45
getNumberOfVariablesMethod · 0.45
analyzeMethod · 0.45
getRedundantRowsMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected