Aller au contenu

Mathc matrices/h17b

Un livre de Wikilivres.


Bibliothèque



Installer ce fichier dans votre répertoire de travail.

vgj1tp.h
/* ------------------------------------ */
/*  Save as :   vgj1tp.h                */
/* ------------------------------------ */
double **GJ_TP_mR(
double **Ab
)
{
double **A;

   if(Ab[R_SIZE][C0] == Ab[C_SIZE_A][C0])
     {
       A = i_RC_mR(Ab[R_SIZE][C0],Ab[C_SIZE_A][C0]);

       c_Ab_A_mR(Ab,A);

       if(det_R(A)) gj_TP_mR(Ab);
       
       f_mR(A);
      }

   else if(Ab[R_SIZE][C0] <  Ab[C_SIZE_A][C0])
     {
       A = i_RC_mR(Ab[R_SIZE][C0],Ab[R_SIZE][C0]);

       c_Ab_subArxr_mR(Ab,A);

       if(det_R(A)) gj_TP_mR(Ab);
       
       f_mR(A);
      }

    else if(Ab[R_SIZE][C0] >  Ab[C_SIZE_A][C0]) 
    
    {
     printf("\n Error : GJ_TP_mR();\n");
     printf("\n The number of colums\n");
     printf("\n must be superior or egal\n");
     printf("\n to the number of rows\n");
     printf("\n Press return to continue.\n");
     fflush(stdout);
     getchar();
     exit(EXIT_FAILURE);
    }
  
return(Ab);
}
/* ------------------------------------ */
/* ------------------------------------ */
double **GJ_TPfreeV_mR(
double **Ab,
double **new_Ab)
{
int r;
	            
  c_mR(Ab,new_Ab);
                                                         
  put_freeV_TP_mR(new_Ab,Ab[R_SIZE][C0]);
  
  r = rsize_R(new_Ab);
  
  while(r>R1)
    
        zero_below_pivot_gj1Ab_mR(new_Ab,r--);	
	
return(new_Ab);
}
/* ------------------------------------ */
/* ------------------------------------ */


Déclaration des fichiers h.