Application


Installer et compiler ces fichiers dans votre répertoire de travail.


c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define   RCA RC4
#define   CX  C1
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double a[RCA*(RCA*C2)]={
    +3,1, -4,1, -2,1, -1,1,
    +5,2, -3,2, -0,2, -2,2,      
    +6,3, -0,3, -3,3, -2,3,
    +3,4, -3,4, -1,4, -3,4   
};

double x_B[RCA*(CX*C2)]={
   +1,+1,
   +2,+2, 
   +3,+3, 
   +4,+4 
};

double b[RCA*(RCA*C2)]={
    +1,+2, +2,+5, +6,+2, +6,+5,   
    +3,+3, +2,+4, +1,+3, +6,+4,
    +5,+4, +5,+3, +3,+4, +6,+3,
    +5,+5, +5,+2, +2,+5, +4,+2 
};

double **A   = ca_A_mZ(a, i_mZ(RCA,RCA));
double **B   = ca_A_mZ(b, i_mZ(RCA,RCA));
double **D     =          i_mZ(RCA,RCA) ;

double **X_B = ca_A_mZ(x_B,  i_mZ(RCA,CX));
double **X_S = mul_mZ(B,X_B, i_mZ(RCA,CX));
double **T   =               i_mZ(RCA,CX) ;

double **invB  =  inv_mZ(B, i_mZ(RCA,RCA));
double **invBA =            i_mZ(RCA,RCA) ;

double **DX_B  =            i_mZ(RCA,CX) ;

/* D = invB*A*B        */
  mul_mZ(invB,A,invBA);       
  mul_mZ(invBA,B,D);
/* [T(x)]_B = D*x_B    */ 
  mul_mZ(D,X_B,DX_B);   
  
  clrscrn();
  printf(" In the Standard basis the linear application is :\n\n");
  printf(" T(x_S) = A x_S");
  p_mZ(mul_mZ(A,X_S,T), S10,P2, S8,P2, C4); 
  printf("with\n\n"
         "x_S");
  p_mZ(X_S, S10,P2, S8,P2, C4);   
  printf("A");
  p_mZ(A, S10,P2, S8,P2, C4);   

  stop();
  
  clrscrn();
  printf(" In the B basis the linear application is :\n\n"
         " [T(x_B)]_B = D*x_B           with  D = (invB A B)");
  p_mZ(DX_B, S10,P2, S8,P2, C4); 
  printf("with\n\n"
         "x_B");
  p_mZ(X_B, S10,P2, S8,P2, C4);   
  printf("D = (invB A B)");
  p_mZ(D, S10,P2, S8,P2, C4);      
 
  stop();
    
  clrscrn(); 
  printf(" [T(x_B)]_B = D*x_B           with  D = (invB A B)");
  p_mZ(DX_B, S10,P2, S8,P2, C4);  
        
  printf(" Remark : x_S = B x_B\n\n"
         "   [D*x_B]\n"
         " B [D*x_B] = B [(InvB A B) x_B] = (A B)*x_B = A (B x_B) = A x_S \n\n"
         " B*[D*x_B] = A x_S");
  p_mZ(mul_mZ(B,DX_B,T), S10,P2, S8,P2, C4);   
  
  printf(" T(x_S) = A x_S");
  p_mZ(mul_mZ(A,X_S,T), S10,P2, S8,P2, C4); 
  stop();
  
  f_mZ(A);
  f_mZ(B);
  f_mZ(D);  
  
  f_mZ(X_B);
  f_mZ(X_S);
  f_mZ(T);  
  
  f_mZ(invB);  
  f_mZ(invBA);  

  f_mZ(DX_B);
    
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
   Vérifions si les résultats sont compatibles
Exemple de sortie écran :
 In the Standard basis the linear application is :

 T(x_S) = A x_S
   -304.00 -232.00i 
   -571.00 +129.00i 
   -916.00 +204.00i 
  -1220.00 -140.00i 

with

x_S
     +9.00  +85.00i 
     -2.00  +70.00i 
    +14.00  +82.00i 
     +5.00  +69.00i 

A
     +3.00   +1.00i      -4.00   +1.00i      -2.00   +1.00i      -1.00   +1.00i 
     +5.00   +2.00i      -3.00   +2.00i      +0.00   +2.00i      -2.00   +2.00i 
     +6.00   +3.00i      +0.00   +3.00i      -3.00   +3.00i      -2.00   +3.00i 
     +3.00   +4.00i      -3.00   +4.00i      -1.00   +4.00i      -3.00   +4.00i 

 Press return to continue. 


 In the B basis the linear application is :

 [T(x_B)]_B = D*x_B           with  D = (invB A B)
   -331.03 +332.15i 
   +282.69 +150.91i 
   -132.29 -105.53i 
    +84.94 -190.71i 

with

x_B
     +1.00   +1.00i 
     +2.00   +2.00i 
     +3.00   +3.00i 
     +4.00   +4.00i 

D = (invB A B)
     +4.59  +24.55i      -6.58  +21.29i      -0.02  +28.53i      +2.30  +44.72i 
    +11.03  -13.75i      +8.85   +3.23i     +20.08   -7.85i     +31.96   -8.76i 
     -6.87   +4.32i      -6.36   -2.81i     -11.03   +1.79i     -16.55   +2.32i 
     -9.83   -4.90i      +2.85   -6.41i      -5.04  -13.94i      -8.41  -19.57i 

 Press return to continue. 


 [T(x_B)]_B = D*x_B           with  D = (invB A B)
   -331.03 +332.15i 
   +282.69 +150.91i 
   -132.29 -105.53i 
    +84.94 -190.71i 

 Remark : x_S = B x_B

   [D*x_B]
 B [D*x_B] = B [(InvB A B) x_B] = (A B)*x_B = A (B x_B) = A x_S 

 B*[D*x_B] = A x_S
   -304.00 -232.00i 
   -571.00 +129.00i 
   -916.00 +204.00i 
  -1220.00 -140.00i 

 T(x_S) = A x_S
   -304.00 -232.00i 
   -571.00 +129.00i 
   -916.00 +204.00i 
  -1220.00 -140.00i 

 Press return to continue.