Mathc complexes/a41

Un livre de Wikilivres.

Bibliothèque

Installer ce fichier dans votre répertoire de travail.

wrm.h
/* ------------------------------------ */
/*  Save as :   wrm.h                  */
/* ------------------------------------ */
double **r_mZ(
double **A,
int      n
)
{
int      r;
int      c;

  for     (r=R1; r<A[R_SIZE][C0]; r++)
 	  for (c=R1; c<A[C_SIZE][C0]; c++)

                 A[r][c] = r_I(n);
                 
return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **r_mRZ(
double **A,
int      n
)
{
int      r;
int      c;

  for     (r=R1; r<A[R_SIZE][C0]; r++)
 	  for (c=R1; c<A[C_SIZE][C0]; c+=C2)
          {
                 A[r][c]    = r_I(n);
                 A[r][c+C1] =      0;
          }
                 
return(A);
}
/* ------------------------------------ */
double **rE_mZ(
double **A,
int      n,
double   E
)
{
int      r;
int      c;

  for     (r=R1; r<A[R_SIZE][C0]; r++)
 	  for (c=R1; c<A[C_SIZE][C0]; c++)

                    A[r][c]  = r_I(n)*E;
        
return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **rcsymmetric_mZ(
double **A,
int      n
)
{
int r = rsize_Z(A);
int c = csize_Z(A);	
	
double **B          = r_mZ(i_mZ(r,c),n);
double **B_T        = ctranspose_mZ(B,i_mZ(c,r));

         mul_mZ(B,B_T, A);
         
   f_mZ(B);
   f_mZ(B_T);

 return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **rcsymmetric_mRZ(
double **A,
int      n
)
{
int r = rsize_Z(A);
int c = csize_Z(A);	
	
double **B          = r_mRZ(i_mZ(r,c),n);
double **B_T        = ctranspose_mZ(B,i_mZ(c,r));

         mul_mZ(B,B_T, A);
         
   f_mZ(B);
   f_mZ(B_T);

 return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **rEcsymmetric_mZ(
double **A,
int      n,
double   E
)
{
int r = rsize_Z(A);
int c = csize_Z(A);	
	
double **B          = rE_mZ(i_mZ(r,c),n,E);
double **B_T        = ctranspose_mZ(B,i_mZ(c,r));

         mul_mZ(B,B_T, A);
         
   f_mZ(B);
   f_mZ(B_T);

 return(A);
}
/* ------------------------------------ */       
/* ------------------------------------ */
double **r_Q_mZ(
double **Q,
int      n
)
{
double **T = r_mZ(  i_mZ(csize_Z(Q),
                         rsize_Z(Q)),n);
                      
  orth_mZ(T,Q);
  Normalize_mZ(Q);
  
  f_mZ(T);
    
 return(Q);  
}
/* ------------------------------------ */
double **r_q_mZ(
double **Q,
int      n
)
{
double **T = r_mZ(  i_mZ(csize_Z(Q),
                         rsize_Z(Q)),n);
                      
  orth_mZ(T,Q);
  
  f_mZ(T);
    
 return(Q);  
}
/* ------------------------------------ */
/* ------------------------------------ */