Linear Algebra and the C Language/a00l
Install this file in your working directory.
/* ------------------------------------ */
/* Save as : vi_size.h */
/* ------------------------------------ */
/* ------------------------------------ */
/* - i_mR() add the row R0 then -R1---- */
/* ------------------------------------ */
int rsize_R(
double **A
)
{
return( (A[R_SIZE][C0]-R1) );
}
/* ------------------------------------ */
/* - i_mR() add the column C0 then -C1 */
/* ------------------------------------ */
int csize_R(
double **A
)
{
return( (A[C_SIZE][C0]-C1) );
}
/* ------------------------------------ */
/* Ab = i_Abr_Ac_bc_mR(RAb, CA, Cb); */
/* ------------------------------------ */
int csize_A_R(
double **Ab
)
{
return( (Ab[C_SIZE_A][C0])-C1);
}
/* ------------------------------------ */
/* Ab = i_Abr_Ac_bc_mR(RAb, CA, Cb); */
/* ------------------------------------ */
int csize_b_R(
double **Ab
)
{
return( (Ab[C_SIZE][C0])-(Ab[C_SIZE_A][C0]));
}
/* ------------------------------------ */
/* ------------------------------------ */
rsize_R(); will give us the number of rows of a matrix.
csize_R(); will give us the number of columns of a matrix
csize_A_R(); returns the number of columns of A for the system of equations Ab.
csize_b_R(); returns the number of columns of b for the system of equations Ab.
For these functions, I use R instead of mR because the function returns a real number instead of a matrix.