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

Method getSubMatrix

kernel/numeric/mpr_base.cc:2519–2548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2517}
2518
2519ideal resMatrixDense::getSubMatrix()
2520{
2521 int k,i,j,l;
2522 resVector *vecp;
2523
2524 // generate quadratic matrix resmat of size subSize
2525 matrix resmat= mpNew( subSize, subSize );
2526
2527 j=1;
2528 for ( k= numVectors - 1; k >= 0; k-- )
2529 {
2530 vecp= getMVector(k);
2531 if ( vecp->isReduced ) continue;
2532 l=1;
2533 for ( i= numVectors - 1; i >= 0; i-- )
2534 {
2535 if ( getMVector(i)->isReduced ) continue;
2536 if ( !nIsZero(vecp->getElemNum(numVectors - i - 1)) )
2537 {
2538 MATELEM(resmat,j,l)= pCopy( vecp->getElem(numVectors-i-1) );
2539 }
2540 l++;
2541 }
2542 j++;
2543 }
2544
2545 // obachman: idMatrix2Module frees resmat !!
2546 ideal resmod= id_Matrix2Module(resmat,currRing);
2547 return resmod;
2548}
2549
2550number resMatrixDense::getDetAt( const number* evpoint )
2551{

Callers

nothing calls this directly

Calls 4

mpNewFunction · 0.85
id_Matrix2ModuleFunction · 0.85
getElemNumMethod · 0.80
getElemMethod · 0.80

Tested by

no test coverage detected