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/a01s

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

__NOTOC__ Install this file in your working directory. /* ------------------------------------ */ /* Save as : vgsort.h */ /* ------------------------------------ */ /* ------------------------------------ */ double **sort_c_mR( double **Ab ) { double **T = i_RC_mR(Ab[R_SIZE][C0],Ab[C_SIZE][C0]); int c; for(c=C1; c<Ab[C_SIZE][C0]; c++) c_c_withR0_mR( Ab, c, T, Ab[R0][c]); c_withR0_mR(T,Ab); f_mR(T); return(Ab); } /* ------------------------------------ */ /* ------------------------------------ */ double **sort_r_mR( double **Ab ) { double pivot; int c; int r; int r_pivot = R1; for ( c=C1; c<Ab[C_SIZE_A][C0]; c++) { r = r_pivot; pivot = 0.; while( (pivot<ERROR_E) && r<Ab[R_SIZE][C0] ) { pivot = fabs( Ab[r][c] ); if(pivot>ERROR_E) { swapR_mR(Ab, r, r_pivot); r_pivot++; } r++; } } return(Ab); } /* ------------------------------------ */ /* ------------------------------------ */