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

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

__NOTOC__ Determinant: Code study The function i_RC_mR(A[R_SIZE][C0], A[C_SIZE][C0]); reads the size of the matrix directly from memory. The function pivotbest_mR(); returns 1, if there is an even change of rows and columns, and returns -1, if there is an odd change of rows and columns. The function zero_under_pivot_mR(); returns the value of the pivot. /* ------------------------------------ */ /* ------------------------------------ */ double det_R( double **A ) { double **T = c_mR(A, i_RC_mR(A[R_SIZE][C0], A[C_SIZE][C0])); double deter=1; int rc; for( rc=C1; rc<T[C_SIZE][C0]; rc++) { deter *= pivotbest_mR(T,rc); deter *= zero_under_pivot_mR(T,rc); } f_mR(T); return(deter); } /* ------------------------------------ */ /* ------------------------------------ */