Linear Algebra and the C Language/a00x
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 /* 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] = r_E(n,e);
return(A);
}
/* ------------------------------------ */
/* 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);
}
/* ------------------------------------ */
/* ------------------------------------ */