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

Method allocateMemory

src/engine/ConstraintMatrixAnalyzer.cpp:123–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void ConstraintMatrixAnalyzer::allocateMemory()
124{
125 // Initialize the row and column headers
126 _rowHeaders = new unsigned[_m];
127 _columnHeaders = new unsigned[_n];
128 _rowHeadersInverse = new unsigned[_m];
129 _columnHeadersInverse = new unsigned[_n];
130
131 for ( unsigned i = 0; i < _m; ++i )
132 {
133 _rowHeaders[i] = i;
134 _rowHeadersInverse[i] = i;
135 }
136
137 for ( unsigned i = 0; i < _n; ++i )
138 {
139 _columnHeaders[i] = i;
140 _columnHeadersInverse[i] = i;
141 }
142
143 // Initialize the row and column counters
144 _numRowElements = new unsigned[_m];
145 _numColumnElements = new unsigned[_n];
146
147 for ( unsigned i = 0; i < _m; ++i )
148 _numRowElements[i] = _A.getRow( i )->getNnz();
149
150 for ( unsigned i = 0; i < _n; ++i )
151 _numColumnElements[i] = _At.getRow( i )->getNnz();
152
153 // Work memory
154 _workRow = new double[_n];
155 _workRow2 = new double[_n];
156}
157
158void ConstraintMatrixAnalyzer::gaussianElimination()
159{

Callers

nothing calls this directly

Calls 2

getNnzMethod · 0.45
getRowMethod · 0.45

Tested by

no test coverage detected