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

Method dump

src/basis_factorization/SparseLUFactors.cpp:130–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

128}
129
130void SparseLUFactors::dump() const
131{
132 printf( "\nDumping LU factos:\n" );
133
134 printf( "\tDumping F:\n" );
135 _F->dumpDense();
136
137 printf( "\tDumping V:\n" );
138 _V->dumpDense();
139
140 printf( "\tDumping product F*V:\n" );
141
142 double *result = new double[_m * _m];
143
144 std::fill_n( result, _m * _m, 0.0 );
145 for ( unsigned i = 0; i < _m; ++i )
146 {
147 for ( unsigned j = 0; j < _m; ++j )
148 {
149 result[i * _m + j] = 0;
150 for ( unsigned k = 0; k < _m; ++k )
151 {
152 result[i * _m + j] += ( i == k ? 1.0 : _F->get( i, k ) ) * _V->get( k, j );
153 }
154 }
155 }
156
157 for ( unsigned i = 0; i < _m; ++i )
158 {
159 printf( "\t" );
160 for ( unsigned j = 0; j < _m; ++j )
161 {
162 printf( "%8.2lf ", result[i * _m + j] );
163 }
164 printf( "\n" );
165 }
166
167 printf( "\tDumping the implied U:\n" );
168 for ( unsigned i = 0; i < _m; ++i )
169 {
170 unsigned uRow = _P._columnOrdering[i];
171
172 printf( "\t" );
173 for ( unsigned j = 0; j < _m; ++j )
174 {
175 unsigned uCol = _Q._rowOrdering[j];
176 printf( "%8.2lf ", _V->get( uRow, uCol ) );
177 }
178 printf( "\n" );
179 }
180
181 printf( "\tDumping the stored V diagonal:\n" );
182 for ( unsigned i = 0; i < _m; ++i )
183 {
184 printf( "\t%8.2lf\n", _vDiagonalElements[i] );
185 }
186 printf( "\n" );
187

Callers

nothing calls this directly

Calls 2

dumpDenseMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected