Bibliothèque

Installer ce fichier dans votre répertoire de travail.

wrhm.h
/* ------------------------------------ */
/*  Save as :   wrhm.h                  */
/* ------------------------------------ */
/* ------------------------------------ */
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);  
}
/* ------------------------------------ */
/* ------------------------------------ */
double **r_hermitian_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));

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

 return(A);
}
/* ------------------------------------ */
double **r_skew_hermitian_mZ(
double **A,
int n)
{
int r = rsize_Z(A);

double **B  =          r_mZ(      i_mZ(r,r), 9);
double **BT = ctranspose_mZ(B,    i_mZ(r,r));

  sub_mZ(B,BT,A);

  f_mZ(B);
  f_mZ(BT);
      
return(A);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **rdefinite_positive_mZ(
double **A,
int      n
)
{
int r = rsize_Z(A);

double **Q  =               r_Q_mZ(     i_mZ(r,r),n);
double **QT =        ctranspose_mZ(Q,   i_mZ(r,r));
double **D  = erase_i_mZ(rpdiag_mZ(     i_mZ(r,r),n));
double **QD =               mul_mZ(Q,D, i_mZ(r,r));

         mul_mZ(QD,QT,A);

  f_mZ(Q);
  f_mZ(QT);
  f_mZ(D);
  f_mZ(QD);
  
 return(A);
}
/* ------------------------------------ */
double **rdefinite_negative_mZ(
double **A,
int      n
)
{
int r = rsize_Z(A);

double **Q      =               r_Q_mZ(        i_mZ(r,r),n);
double **QT     =        ctranspose_mZ(Q,      i_mZ(r,r));
double **D      = erase_i_mZ(rpdiag_mZ(        i_mZ(r,r),n));
double **sD     =              smul_mZ(-1,D,   i_mZ(r,r));
double **QsD    =               mul_mZ(Q,sD,   i_mZ(r,r));

          mul_mZ(QsD,QT,A);

  f_mZ(Q);
  f_mZ(QT);
  f_mZ(D);
  f_mZ(sD);
  f_mZ(QsD);
  
 return(A);
}
/* ------------------------------------ */ 
/* ------------------------------------ */
double **rdefpos_diag_mZ(
double **D,
double **A,
int      n
)
{
int r = rsize_Z(A);

double **Q  =        r_Q_mZ(     i_mZ(r,r),n);
double **QT = ctranspose_mZ(Q,   i_mZ(r,r));
double **QD =        mul_mZ(Q,D, i_mZ(r,r));

         mul_mZ(QD,QT,A);

  f_mZ(Q);
  f_mZ(QT);
  f_mZ(QD);
  
 return(A);
}
/* ------------------------------------ */      
/* ------------------------------------ */