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

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 : ve_det2.h */ /* ------------------------------------ */ double **minor_mR( double **A, double **Minor, int minor_r, int minor_c ) { int r; int c; int T_r; int T_c; for(r=R1,T_r=R1; r<A[R_SIZE][C0]; r++) if(minor_r!=r) { for( c=C1,T_c=C1; c<A[C_SIZE][C0]; c++) if(minor_c!=c) Minor[T_r][T_c++] = A[r][c]; T_r++; } return(Minor); } /* ------------------------------------ */ double minor_R( double **A, int r, int c ) { double **T = i_RC_mR((A[R_SIZE][C0]-C1), (A[C_SIZE][C0]-C1)); double minor= det_R(minor_mR(A,T,r,c)); f_mR(T); return(minor); } /* ------------------------------------ */ double cofactor_R( double **A, int r, int c ) { return( ( pow(-1,(r+c))*minor_R(A,r,c) ) ); } /* ------------------------------------ */ double **cofactor_mR( double **A, double **Cofactor ) { int r; int c; for(r=R1; r<A[R_SIZE][C0]; r++) for( c=C1; c<A[C_SIZE][C0]; c++) Cofactor[r][c] = cofactor_R(A,r,c); return(Cofactor); } /* ------------------------------------ */ double **adjoint_mR( double **A, double **Adjoint ) { double **T = i_RC_mR(A[R_SIZE][C0],A[C_SIZE][C0]); transpose_mR(cofactor_mR(A,T),Adjoint); f_mR(T); return(Adjoint); } /* ------------------------------------ */ /* ------------------------------------ */