Mathc complexes/a224
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00d.c |
---|
/* ------------------------------------ */
/* Save as : c00d.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define RA R4
#define CA C5
#define Cb C1
/* ------------------------------------ */
#define RAFree R5
#define CbFree C5
/* ------------------------------------ */
void fun(void)
{
double ab[RA*((CA+Cb)*C2)] ={
-8*2,-4*2, +7*2,-7*2, +6*2,+7*2, -9*2,-4*2, +6*2,-1*2, 0,0,
-8*3,-4*3, +7*3,-7*3, +6*3,+7*3, -9*3,-4*3, +6*3,-1*3, 0,0,
-8*4,-4*4, +7*4,-7*4, +6*4,+7*4, -9*4,-4*4, +6*4,-1*4, 0,0,
-8*7,-4*7, +7*7,-7*7, +6*7,+7*7, -9*7,-4*7, +6*7,-1*7, 0,0
};
double **Ab = ca_A_mZ(ab, i_Abr_Ac_bc_mZ(RA,CA,Cb));
double **A = c_Ab_A_mZ(Ab, i_mZ(RA,CA));
double **b = c_Ab_b_mZ(Ab, i_mZ(RA,Cb));
double **Ab_New = i_Abr_Ac_bc_mZ(RAFree,CA,CbFree) ;
double **b_Free = i_mZ(RAFree,CbFree);
double **A_bFree = i_mZ(RA,CbFree);
clrscrn();
printf("Find a basis for the orthogonal complement of A :\n\n");
printf(" A :");
p_mZ(A, S4,P0, S3,P0, C8);
printf(" b :");
p_mZ(b, S4,P0, S3,P0, C8);
printf(" Ab :");
p_mZ(Ab, S4,P0, S3,P0, C8);
stop();
clrscrn();
printf(" gj_PP_mZ(Ab) :");
p_mZ(gj_PP_mZ(Ab), S7,P3, S7,P3, C5);
stop();
clrscrn();
put_zeroR_mZ(Ab,Ab_New);
put_freeV_mZ(Ab_New);
printf(" put_zero_row_mZ(Ab,Ab_New);\n"
" put_freeV_mZ(Ab_New);\n\n"
" Ab_New :");
p_mZ(Ab_New, S7,P3, S7,P3, C5);
stop();
clrscrn();
printf(" gj_mZ(Ab) :");
p_mZ(gj_mZ(Ab_New), S7,P3, S7,P3, C5);
printf(" b_Free : Free variables");
p_mZ(c_Ab_b_mZ(Ab_New,b_Free), S7,P3, S7,P3, C5);
stop();
clrscrn();
printf(" A :");
p_mZ(A, S4,P0, S3,P0, C8);
printf(" b_Free :");
p_mZ(b_Free, S7,P3, S7,P3, C5);
printf(" A * b_Free :");
p_mZ(mul_mZ(A,b_Free,A_bFree), S7,P3, S7,P3, C5);
stop();
f_mZ(Ab);
f_mZ(A);
f_mZ(b);
f_mZ(Ab_New);
f_mZ(b_Free);
f_mZ(A_bFree);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
On commence par calculer les variables libres.
Les colonnes de b_free sont une base pour le complément orthogonal de A.
A * b_free = 0
Cela prouve que les vecteurs lignes de A sont orthogonaux aux vecteurs colonnes de b_free.
Exemple de sortie écran :
-----------------------------------------
Find a basis for the orthogonal complement of A :
A :
-16 -8i +14-14i +12+14i -18 -8i +12 -2i
-24-12i +21-21i +18+21i -27-12i +18 -3i
-32-16i +28-28i +24+28i -36-16i +24 -4i
-56-28i +49-49i +42+49i -63-28i +42 -7i
b :
+0 +0i
+0 +0i
+0 +0i
+0 +0i
Ab :
-16 -8i +14-14i +12+14i -18 -8i +12 -2i +0 +0i
-24-12i +21-21i +18+21i -27-12i +18 -3i +0 +0i
-32-16i +28-28i +24+28i -36-16i +24 -4i +0 +0i
-56-28i +49-49i +42+49i -63-28i +42 -7i +0 +0i
Press return to continue.
-----------------------------------------
gj_PP_mZ(Ab) :
+1.000 +0.000i -0.350 +1.050i -0.950 -0.400i +1.100 -0.050i -0.550 +0.400i
+0.000 +0.000i +0.000 +0.000i -0.000 -0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i -0.000 -0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i -0.000 -0.000i +0.000 +0.000i +0.000 +0.000i
-0.000 +0.000i
+0.000 +0.000i
+0.000 +0.000i
+0.000 +0.000i
Press return to continue.
-----------------------------------------
put_zero_row_mZ(Ab,Ab_New);
put_freeV_mZ(Ab_New);
Ab_New :
+1.000 +0.000i -0.350 +1.050i -0.950 -0.400i +1.100 -0.050i -0.550 +0.400i
+0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i
-0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i
Press return to continue.
-----------------------------------------
gj_mZ(Ab) :
+1.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i
+0.000 +0.000i +0.350 -1.050i +0.950 +0.400i -1.100 +0.050i +0.550 -0.400i
+0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 -0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i
new_b : Free variables
+0.000 +0.000i +0.350 -1.050i +0.950 +0.400i -1.100 +0.050i +0.550 -0.400i
+0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 -0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i
Press return to continue.
-----------------------------------------
A :
-16 -8i +14-14i +12+14i -18 -8i +12 -2i
-24-12i +21-21i +18+21i -27-12i +18 -3i
-32-16i +28-28i +24+28i -36-16i +24 -4i
-56-28i +49-49i +42+49i -63-28i +42 -7i
b_Free :
+0.000 +0.000i +0.350 -1.050i +0.950 +0.400i -1.100 +0.050i +0.550 -0.400i
+0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 -0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +0.000 +0.000i +1.000 +0.000i
A * b_Free :
+0.000 +0.000i +0.000 +0.000i -0.000 -0.000i +0.000 -0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i -0.000 -0.000i +0.000 -0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i -0.000 -0.000i +0.000 -0.000i +0.000 +0.000i
+0.000 +0.000i +0.000 +0.000i -0.000 -0.000i +0.000 -0.000i -0.000 +0.000i
Press return to continue.