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

Method exportAssignment

src/engine/Marabou.cpp:197–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197void Marabou::exportAssignment() const
198{
199 String assignmentFileName = "assignment.txt";
200 AutoFile exportFile( assignmentFileName );
201 exportFile->open( IFile::MODE_WRITE_TRUNCATE );
202
203 unsigned numberOfVariables = _inputQuery.getNumberOfVariables();
204 // Number of Variables
205 exportFile->write( Stringf( "%u\n", numberOfVariables ) );
206
207 // Export each assignment
208 for ( unsigned var = 0; var < numberOfVariables; ++var )
209 exportFile->write( Stringf( "%u, %f\n", var, _inputQuery.getSolutionValue( var ) ) );
210
211 exportFile->close();
212}
213
214void Marabou::solveQuery()
215{

Callers

nothing calls this directly

Calls 6

StringfClass · 0.85
getSolutionValueMethod · 0.80
openMethod · 0.45
getNumberOfVariablesMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected