Mathc complexes/a127
Apparence
Installer ce fichier dans votre répertoire de travail.
wrm_com2.h |
---|
/* ------------------------------------ */
/* Save as : wrm_com2.h */
/* ------------------------------------ */
/* ------------------------------------ */
double **Diag_sin_mZ(
double **A,
double **sinA)
{
int r;
int c;
int i=0;
m0_mZ(sinA);
for (r=R1; r<A[R_SIZE][C0]; r++,i++)
for (c=C1; c<A[C_SIZE][C0]; c+=C2)
if((r+i)==c)
sinA[r][c] = sin(A[r][c]);
return(sinA);
}
/* ------------------------------------ */
double **Diag_cos_mZ(
double **A,
double **cosA)
{
int r;
int c;
int i=0;
m0_mZ(cosA);
for (r=R1; r<A[R_SIZE][C0]; r++,i++)
for (c=C1; c<A[C_SIZE][C0]; c+=C2)
if((r+i)==c) cosA[r][c]=cos(A[r][c]);
return(cosA);
}
/* ------------------------------------ */
void r_commute2_mZ(
double **A,
double **B,
int n
)
{
double **P;
double **Pinv;
double **D;
double **T;
double **Dt;
int r=rsize_Z(A);
P = i_mZ(r,r);
Pinv = i_mZ(r,r);
D = i_mZ(r,r);
T = i_mZ(r,r);
Dt = i_mZ(r,r);
r_mZ(P,n);
rdiag_mZ(D,n);
inv_mZ(P,Pinv);
mul_mZ(P,Diag_sin_mZ(D,Dt),T);
mul_mZ(T,Pinv,A);
mul_mZ(P,Diag_cos_mZ(D,Dt),T);
mul_mZ(T,Pinv,B);
f_mZ(P);
f_mZ(Pinv);
f_mZ(D);
f_mZ(T);
f_mZ(Dt);
}
/* ------------------------------------ */
/* ------------------------------------ */
void rE_commute2_mZ(
double **A,
double **B,
int n,
double E /* 1E-1 1E-0 1E+1 */
)
{
double **P;
double **Pinv;
double **D;
double **T;
double **Dt;
int r=rsize_Z(A);
P = i_mZ(r,r);
Pinv = i_mZ(r,r);
D = i_mZ(r,r);
T = i_mZ(r,r);
Dt = i_mZ(r,r);
rE_mZ(P,n,E);
rdiag_mZ(D,n);
inv_mZ(P,Pinv);
mul_mZ(P,Diag_sin_mZ(D,Dt),T);
mul_mZ(T,Pinv,A);
mul_mZ(P,Diag_cos_mZ(D,Dt),T);
mul_mZ(T,Pinv,B);
f_mZ(P);
f_mZ(Pinv);
f_mZ(D);
f_mZ(T);
f_mZ(Dt);
}
/* ------------------------------------ */
/* ------------------------------------ */
Déclaration des fichiers h.