Mathc matrices/h08c
Apparence
Installer ce fichier dans votre répertoire de travail.
ve_det3.h |
---|
/* ------------------------------------ */
/* Save as : ve_det3.h */
/* ------------------------------------ */
double **inv_mR(
double **A,
double **InvA
)
{
double det = det_R(A);
double invdet = 1;
int r;
if(!det)
{
printf("\n inv_mR error - The determinant is Zero");
printf("\n Press return to continue.\n");
fflush(stdout);
getchar();
exit(EXIT_FAILURE);
}
adjoint_mR(A,InvA);
invdet /= det;
for(r=R1; r<A[R_SIZE][C0]; r++)
mulR_mR(InvA,invdet,r);
return(InvA);
}
/* ------------------------------------ */
double **UxV_mR(
double **U_T,
double **V_T,
double **UxV_T
)
{
double **A = i_mR(R3, C3);
// u and v -> A
c_r_mR(U_T, R1, A, R2);
c_r_mR(V_T, R1, A, R3);
// cofactor(detA) -> (u x v)
c_s_mR(cofactor_R(A, R1, C1), UxV_T, R1, C1);
c_s_mR(cofactor_R(A, R1, C2), UxV_T, R1, C2);
c_s_mR(cofactor_R(A, R1, C3), UxV_T, R1, C3);
f_mR(A);
return(UxV_T);
}
/* ------------------------------------ */
/* ------------------------------------ */
Déclaration des fichiers h.