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

Function subMatrix

kernel/linear_algebra/linearAlgebra.cc:733–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

731}
732
733bool subMatrix(const matrix aMat, const int rowIndex1, const int rowIndex2,
734 const int colIndex1, const int colIndex2, matrix &subMat)
735{
736 if (rowIndex1 > rowIndex2) return false;
737 if (colIndex1 > colIndex2) return false;
738 int rr = rowIndex2 - rowIndex1 + 1;
739 int cc = colIndex2 - colIndex1 + 1;
740 subMat = mpNew(rr, cc);
741 for (int r = 1; r <= rr; r++)
742 for (int c = 1; c <= cc; c++)
743 MATELEM(subMat, r, c) =
744 pCopy(MATELEM(aMat, rowIndex1 + r - 1, colIndex1 + c - 1));
745 return true;
746}
747
748bool charPoly(const matrix aMat, poly &charPoly)
749{

Callers 2

hessenbergFunction · 0.85
qrDSFunction · 0.85

Calls 1

mpNewFunction · 0.85

Tested by

no test coverage detected