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

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 : vgjinv.h */ /* ------------------------------------ */ double **invgj_pivot_mR( double **Ab ) { double pivot = 1.; int r= R1; while( pivot && (r<Ab[R_SIZE ][C0]) ) { pivot = pivotbestAId_mR(Ab,r); if(pivot>ERROR_E) zero_under_pivot_gj1Ab_mR(Ab,r); r++; } while( (r>R1) ) { r--; zero_above_pivot_gj1Ab_mR(Ab,r); } return(Ab); } /* ------------------------------------ */ double **invgj_mR( double **A, double **invA ) { double **ID = i_RC_mR(A[R_SIZE][C0],A[C_SIZE][C0]); double **AID; int r = A[R_SIZE][C0]; r--; AID = i_Abr_Ac_bc_mR(r,r,r); eye_mR(ID); c_A_b_Ab_mR(A,ID,AID); invgj_pivot_mR(AID); sort_c_mR(AID); sort_r_mR(AID); c_Inv_A_mR(AID,invA); f_mR(AID); f_mR(ID); return(invA); } /* ------------------------------------ */ /* ------------------------------------ */