MCPcopy Create free account
hub / github.com/Singular/Singular / luRank

Function luRank

kernel/linear_algebra/linearAlgebra.cc:230–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230int luRank(const matrix aMat, const bool isRowEchelon, const ring R)
231{
232 if (isRowEchelon) return rankFromRowEchelonForm(aMat);
233 else
234 { /* compute the LU-decomposition and read off the rank from
235 the upper triangular matrix of that decomposition */
236 matrix pMat;
237 matrix lMat;
238 matrix uMat;
239 luDecomp(aMat, pMat, lMat, uMat,R);
240 int result = rankFromRowEchelonForm(uMat);
241
242 /* clean-up */
243 id_Delete((ideal*)&pMat,R);
244 id_Delete((ideal*)&lMat,R);
245 id_Delete((ideal*)&uMat,R);
246
247 return result;
248 }
249}
250
251bool upperRightTriangleInverse(const matrix uMat, matrix &iMat,
252 bool diagonalIsOne, const ring R)

Callers 2

jjRANK2Function · 0.85
jjRANK1Function · 0.85

Calls 3

rankFromRowEchelonFormFunction · 0.85
luDecompFunction · 0.85
id_DeleteFunction · 0.85

Tested by

no test coverage detected