Mathc matrices/h25e
Apparence
Installer ce fichier dans votre répertoire de travail.
d.h |
---|
/* ------------------------------------ */
/* Save as : d.h */
/* ------------------------------------ */
void verify_eq_sphere_mR(
double **A,
double x,
double y,
double z
)
{
double p = cofactor_R(A,R1,C1)*(pow(x,2)+pow(y,2)+pow(z,2))
+ cofactor_R(A,R1,C2)*(x)
+ cofactor_R(A,R1,C3)*(y)
+ cofactor_R(A,R1,C4)*(z)
+ cofactor_R(A,R1,C5);
printf(" With x=%+5.1f y=%+5.1f z=%+5.1f eq=%+5.5f\n",
x,y,z,p);
}
/* ------------------------------------ */
void p_Det_mR(
double **A,
int e,
int d
)
{
int r;
int c;
for(r=R2;r<A[R_SIZE][C0];r++)
{
printf("\n");
for (c=C1;c<A[C_SIZE][C0];c++)
printf("%+*.*f",e,d,A[r][c]);
}
printf("\n\n");
}
/* ------------------------------------ */
double ** m_Sphere_A_mR(
double **At,
double **A
)
{
int ra;
int r;
int c;
int ct;
for(c=C1;c<A[C_SIZE][C0];c++)A[R1][c]=1.; /* First line */
for(r=R2,ra=R1; r<A[R_SIZE][C0]; r++,ra++)
{
c=C1;
for(ct=C1;ct<At[C_SIZE][C0];ct++)
A[r][c]+=pow(At[ra][ct],2); /* x^2+y^2+z^2 */
c++; A[r][c]= At[ra][C1]; /* x^1 */
c++; A[r][c]= At[ra][C2]; /* y^1 */
c++; A[r][c]= At[ra][C3]; /* z^1 */
c++; A[r][c]= 1.; /* x^0*y^0*z^0 */
}
return(A);
}
/* --------------------------------- */
/* --------------------------------- */
Déclaration des fichiers h.