Mathc matrices/02k
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = rcentrosymmetric_mR( i_mR(r,r),9.);
double **J = J_mR( i_mR(r,r));
double **JA = mul_mR(J,A, i_mR(r,r));
double **AJ = mul_mR(A,J, i_mR(r,r));
clrscrn();
printf(" A :");
p_mR(A, S5,P0,C7);
printf(" J :");
p_mR(J, S5,P0,C7);
stop();
clrscrn();
printf(" AJ :");
p_mR(AJ, S5,P0,C7);
printf(" JA :");
p_mR(JA, S5,P0,C7);
f_mR(A);
f_mR(J);
f_mR(AJ);
f_mR(JA);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun( rp_I(RC2)*RC2 + RC1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Une matrice A est centrosymétrique si et seulement si AJ = JA.
Exemple de sortie écran :
A :
-8 +3 +6 +1 -9
-8 +8 -7 +8 +7
+1 +3 -3 +3 +1
+7 +8 -7 +8 -8
-9 +1 +6 +3 -8
J :
+0 +0 +0 +0 +1
+0 +0 +0 +1 +0
+0 +0 +1 +0 +0
+0 +1 +0 +0 +0
+1 +0 +0 +0 +0
Press return to continue.
AJ :
-9 +1 +6 +3 -8
+7 +8 -7 +8 -8
+1 +3 -3 +3 +1
-8 +8 -7 +8 +7
-8 +3 +6 +1 -9
JA :
-9 +1 +6 +3 -8
+7 +8 -7 +8 -8
+1 +3 -3 +3 +1
-8 +8 -7 +8 +7
-8 +3 +6 +1 -9
Press return to continue
Press X return to stop