Linear Algebra and the C Language/a01q
Install this file in your working directory.
/* ------------------------------------ */
/* Save as : vgel_op.h */
/* ------------------------------------ */
double **swapcoefR0_mR(
double **A,
int c1,
int c2)
{
double T;
T = A[R0][c1];
A[R0][c1] = A[R0][c2];
A[R0][c2] = T;
return(A);
}
/* ------------------------------------ */
double **swapC_withR0_mR(
double **A,
int c1,
int c2)
{
double T;
int r;
for ( r=R0; r<A[R_SIZE][C0]; r++)
{
T = A[r][c1];
A[r][c1] = A[r][c2];
A[r][c2] = T;
}
return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */