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

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 : vgj1tp.h */ /* ------------------------------------ */ /* ------------------------------------ */ double **GJ_TP_PivotBest_mR( double **Ab ) { int r= R1; while(r<Ab[R_SIZE][C0]) { if(fabs(pivotbest_gj1Ab_mR(Ab,r))>ERROR_E) zero_under_pivot_gj1Ab_mR(Ab,r); r++; } return(Ab); } /* ------------------------------------ */ /* ------------------------------------ */ double **GJ_TP_mR( double **Ab ) { double **A; if(Ab[R_SIZE][C0] == Ab[C_SIZE_A][C0]) { A = i_RC_mR(Ab[R_SIZE][C0],Ab[C_SIZE_A][C0]); c_Ab_A_mR(Ab,A); if(det_R(A)) GJ_TP_PivotBest_mR(Ab); f_mR(A); } else if(Ab[R_SIZE][C0] < Ab[C_SIZE_A][C0]) { A = i_RC_mR(Ab[R_SIZE][C0],Ab[R_SIZE][C0]); c_Ab_subArxr_mR(Ab,A); if(det_R(A)) GJ_TP_PivotBest_mR(Ab); f_mR(A); } else if(Ab[R_SIZE][C0] > Ab[C_SIZE_A][C0]) { printf("\n Error : GJ_TP_mR();\n"); printf("\n The number of colums\n"); printf("\n must be superior or egal\n"); printf("\n to the number of rows\n"); printf("\n Press return to continue.\n"); fflush(stdout); getchar(); exit(EXIT_FAILURE); } return(Ab); } /* ------------------------------------ */ /* ------------------------------------ */ double **GJ_TP_FreeV_mR( double **Ab, double **new_Ab) { int r; c_mR(Ab,new_Ab); put_freeV_TP_mR(new_Ab,Ab[R_SIZE][C0]); r = rsize_R(new_Ab); while(r>R1) zero_above_pivot_gj1Ab_mR(new_Ab,r--); return(new_Ab); } /* ------------------------------------ */ /* ------------------------------------ */