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

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 : vrm.h */ /* ------------------------------------ */ /* ------------------------------------ */ /* positive and negative numbers */ /* ------------------------------------ */ double **r_mR( double **A, int n ) { int r; int c; for (r=R1; r<A[R_SIZE][C0]; r++) for (c=C1; c<A[C_SIZE][C0]; c++) A[r][c] = r_I(n); return(A); } /* ------------------------------------ */ /* positive numbers */ /* ------------------------------------ */ double **rp_mR( double **A, int n ) { int r; int c; for (r=R1; r<A[R_SIZE][C0]; r++) for (c=C1; c<A[C_SIZE][C0]; c++) A[r][c] = rp_I(n); return(A); } /* ------------------------------------ */ /* ------------------------------------ */ /* ------------------------------------ */ /* floating point */ /* ------------------------------------ */ double **rE_mR( double **A, int n, double e ) { int r; int c; for (r=R1; r<A[R_SIZE][C0]; r++) for (c=C1; c<A[C_SIZE][C0]; c++) A[r][c] = r_E(n,e); return(A); } /* ------------------------------------ */ /* positive floating point */ /* ------------------------------------ */ double **rEp_mR( double **A, int n, double e /* 1E-1 1E-0 1E+1 */ ) { int r; int c; for (r=R1; r<A[R_SIZE][C0]; r++) for (c=C1; c<A[C_SIZE][C0]; c++) A[r][c] = rp_E(n,e); return(A); } /* ------------------------------------ */ /* ------------------------------------ */ /* ------------------------------------ */ /* ------------------------------------ */ double **r_Q_mR( double **Q, int n ) { double **T = r_mR( i_mR(Q[R_SIZE][C0]-C1, Q[C_SIZE][C0]-C1),n); orth_mR(T,Q,YES); f_mR(T); return(Q); } /* ------------------------------------ */ /* ------------------------------------ */ double **r_q_mR( double **Q, int n ) { double **T = r_mR( i_mR(Q[R_SIZE][C0]-C1, Q[C_SIZE][C0]-C1),n); orth_mR(T,Q,NO); f_mR(T); return(Q); } /* ------------------------------------ */ /* ------------------------------------ */