Mathc matrices/Fichiers c : pbest

Un livre de Wikilivres.


Application


Installer et compiler ces fichiers dans votre répertoire de travail.


pbest.c
/* ------------------------------------ */
/*  Save as :  pbest.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A         = r_mR(i_mR(r,r),99.);

  clrscrn();
  printf(" A :");
  p_mR(A,S5,P0,C6); 

  pivotbest_mR(A,RC1);
  printf(" A :");
  p_mR(A,S5,P0,C6);     

  f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
  fun(rp_I(R3)+R2);

} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Déclaration des fichiers h.



Exemple de sortie écran :
 A :
  -51   +62    +8   +86    +4 
  -57   +22   +28   +90    +2 
  -85   +44   -97   +18   +90 
  -59   -81   +94   -47   +12 
  -23   -91   +48    -1   +34 

 A :
  -97   +44   -85   +18   +90 
  +28   +22   -57   +90    +2 
   +8   +62   -51   +86    +4 
  +94   -81   -59   -47   +12 
  +48   -91   -23    -1   +34 


 Press return to continue
 Press X      to stop