Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Linear Algebra and the C Language/a02c

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

/* ------------------------------------ */ /* Save as : vgpivaid.h */ /* ------------------------------------ */ double pivotbestAId_mR( double **AId, int pv ) { double pivotbest = fabs(AId[pv][pv]); int best_r = pv; int best_c = pv; int r; int c; for ( r=pv; r<AId[R_SIZE][C0]; r++) for ( c=pv; c<AId[R_SIZE][C0]; c++) if(fabs(AId[r][c])>pivotbest) { pivotbest = fabs(AId[r][c]); best_r = r; best_c = c; } c--; if(best_r!=pv) swapR_mR (AId,pv, best_r ); if(best_c!=pv) { swapC_withR0_mR(AId,pv, best_c ); swapC_withR0_mR(AId,pv+c,best_c+c);} return(pivotbest); } /* ------------------------------------ */ /* ------------------------------------ */