Aller au contenu

Mathc complexes/h08b

Un livre de Wikilivres.


Bibliothèque


Installer ce fichier dans votre répertoire de travail.

we_det2.h
/* ------------------------------------ */
/*  Save as :   we_det2.h               */
/* ------------------------------------ */

/* ------------------------------------ */
double **minor_mZ(
double **A,
double **Minor,
int minor_r, /* remove this row    */
int minor_c  /* remove this column */
)
{
int r;
int c;
int T_r;
int T_c;

  for(r=R1,T_r=R1; r<A[R_SIZE][C0]; r++)

    if(minor_r!=r)
      {
       for( c=C1,T_c=C1; c<A[C_SIZE][C0]; c+=C2)
          {
           if(minor_c!=c)
             {
               Minor[T_r][T_c]    = A[r][c];
               Minor[T_r][T_c+C1] = A[r][c+C1];
               T_c+=C2;
             }
           }
        T_r++;
       }
       
return(Minor);
}
/* ------------------------------------ */
nb_Z minor_Z(
double **A,
int r,
int c
)
{
double **T = i_RC_mZ((A[R_SIZE][C0]-C1),
                     (A[C_SIZE][C0]-C2));
nb_Z minor;

 minor_mZ(A,T,r,c);
 minor = det_Z(T);

 f_mZ(T);

return(minor);
}
/* ------------------------------------ */
/* ------------------------------------ */
nb_Z cofactor_Z(
double **A,
int r,
int c
)
{
int c_T = ((c-C1)/C2)+C1;

 return( smul_Z( pow(-1,(r+c_T)),
                 minor_Z(A,r,c)) );
}
/* ------------------------------------ */
/* ------------------------------------ */
double **cofactor_mZ(
double **A,
double **Cofactor
)
{
int r;
int c;
nb_Z Cofac;

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

       for( c=C1; c<A[C_SIZE][C0]; c+=C2)
         { 
		   Cofac = cofactor_Z(A,r,c);
		   
           Cofactor[r][c]     = Cofac.r;
           Cofactor[r][c+C1]  = Cofac.i;
         }
           
return(Cofactor);
}
/* ------------------------------------ */
double **adjoint_mZ(
double **A,
double **Adjointe
)
{
double **T = i_RC_mZ(A[R_SIZE][C0],A[C_SIZE][C0]);

 transpose_mZ(cofactor_mZ(A,T),Adjointe);

 f_mZ(T);
 
return(Adjointe);
}
/* ------------------------------------ */
/* ------------------------------------ */
/* ------------------------------------ */


Déclaration des fichiers h.