Mathc matrices/h09m

Un livre de Wikilivres.


Bibliothèque


Installer ce fichier dans votre répertoire de travail.

vgpivaid.h
/* ------------------------------------ */
/*  Save as :   vgpivaid.h              */
/* ------------------------------------ */
double pivotbestAId_mR(
double **AId,
int pv
)
{
double pivotbest = fabs(AId[pv][pv]);
int       best_r = pv;
int       best_c = pv;

int r;
int c;

  for   ( r=pv; r<AId[R_SIZE][C0]; r++)
    for ( c=pv; c<AId[R_SIZE][C0]; c++) 

            if(fabs(AId[r][c])>pivotbest)
             {
               pivotbest = fabs(AId[r][c]);
                  best_r = r;
                  best_c = c;
             }

 c--;

 if(best_r!=pv)   swapR_mR  (AId,pv,  best_r  );
 if(best_c!=pv) { swapC_withR0_mR(AId,pv,  best_c  );
                  swapC_withR0_mR(AId,pv+c,best_c+c);}
 return(pivotbest);
}
/* ------------------------------------ */
/* ------------------------------------ */


Déclaration des fichiers h.