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

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_tri.h */ /* ------------------------------------ */ double **rdiag_mR( double **A, int n ) { int r; isquare_mR(A,"rdiag_mR;","(A)"); m0_mR(A); for(r=R1; r<A[R_SIZE][C0]; r++) A[r][r] = r_I(n); return(A); } /* ------------------------------------ */ double **rpdiag_mR( double **A, int n ) { int r; isquare_mR(A,"rdiag_mR;","(A)"); m0_mR(A); for(r=R1; r<A[R_SIZE][C0]; r++) A[r][r] = rp_I(n); return(A); } /* ------------------------------------ */ double **rsqrtdiag_mR( double **A, int n ) { int r; isquare_mR(A,"rdiag_mR;","(A)"); m0_mR(A); for(r=R1; r<A[R_SIZE][C0]; r++) A[r][r] = sqrt(rp_I(n)); return(A); } /* ------------------------------------ */ /* ------------------------------------ */ double **rlower_mR( double **A, int n ) { int r; int c; isquare_mR(A,"rlower_mR;","(A)"); m0_mR(A); for (r=R1; r<A[R_SIZE][C0]; r++) for (c=C1; c<A[C_SIZE][C0]; c++) if(r>=c) A[r][c] = r_I(n); return(A); } /* ------------------------------------ */ double **rupper_mR( double **A, int n ) { int r; int c; isquare_mR(A,"rupper_mR;","(A)"); m0_mR(A); for (r=R1; r<A[R_SIZE][C0]; r++) for (c=C1; c<A[C_SIZE][C0]; c++) if(c>=r) A[r][c] = r_I(n); return(A); } /* ------------------------------------ */ /* ------------------------------------ */ double **rToeplitz_mR( double **U, double **V, double **A ) { int cn = C2; int r = R2; int rn = R2; int c = C2; isquare_mR(A,"rlower_mR;","(A)"); c_r_mR(U,R1,A,R1); c_c_mR(V,C1,A,C1); for(cn = C2; r <A[R_SIZE][C0]; cn++,r++) c_rU_rA_cn_mR(U,R1,A,r,cn); for(rn = R2; c <A[C_SIZE][C0]; rn++,c++) c_cV_cA_rn_mR(V,C1,A,c,rn); return(A); } /* ------------------------------------ */ /* ------------------------------------ */ double **rHankel_mR( double **U, double **V, double **A ) { int cn = C2; int r = rsize_R(A)-R1; int c = C1; isquare_mR(A,"rlower_mR;","(A)"); c_c_mR(V,C1,A,C1); c_r_mR(U,R1,A,rsize_R(A)); for(cn = C2; r >= R1; cn++,r--) c_rU_rA_cn_mR(U,R1,A,r,cn); c_c_r_mR(V,C1,U,R1); for(c=C1, r=R1; r < rsize_R(A)-C1; r++, c++) c_Uc_r_mR(U,c,A,r); return(A); } /* ------------------------------------ */ /* ------------------------------------ */ double **rnilpotent_lower_mR( double **A, int n ) { int r; int c; isquare_mR(A,"rnilpotent_lower_mR;","(A)"); m0_mR(A); for (r=R2; r<A[R_SIZE][C0]; r++) for (c=C1; c<A[C_SIZE][C0]; c++) if(r>=(c+C1)) A[r][c] = r_I(n); return(A); } /* ------------------------------------ */ double **rnilpotent_upper_mR( double **A, int n ) { int r; int c; isquare_mR(A,"rnilpotent_upper_mR;","(A)"); m0_mR(A); for (r=R1; r<A[R_SIZE][C0]; r++) for (c=C1+r; c<A[C_SIZE][C0]; c++) if(c>=r) A[r][c] = r_I(n); return(A); } /* ------------------------------------ */ /* ------------------------------------ */