Aller au contenu

Mathc complexes/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 "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A          = r_mZ(i_mZ(r,r),9.);

  clrscrn();
  printf(" A :");
  p_mZ(A, S2,P0, S2,P0, C10); 
     
  pivotbest_mZ(A,R1,C1);
  printf(" A :");
  p_mZ(A, S2,P0, S2,P0, C10);      
         
       
  f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
  fun(rp_I(R2)+R6);
} while(stop_w());

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


L'application de l'algorithme.


Exemple de sortie écran :
 A :
-1+8i +2-1i +6-9i +4-3i +2+2i +6-5i -1-9i 
+6+8i +4-7i +8+8i -5-7i -5-1i -1-7i +6-3i 
+6+8i -1-7i +4+2i -7-1i +8+8i -3+8i -1+6i 
-3+8i -5+6i +6-9i +2+4i -5+4i -9-9i -5-9i 
-7+8i -9-1i +6+8i -7-1i -7-3i -1+6i -1-1i 
+4+8i +6+4i +6-1i -9-1i -7+8i +2-1i -3-1i 
-7-7i -7+4i -5-7i -5+2i -5-9i +2+2i +2-9i 

 A :
-9-9i -5+6i +6-9i +2+4i -5+4i -3+8i -5-9i 
-1-7i +4-7i +8+8i -5-7i -5-1i +6+8i +6-3i 
-3+8i -1-7i +4+2i -7-1i +8+8i +6+8i -1+6i 
+6-5i +2-1i +6-9i +4-3i +2+2i -1+8i -1-9i 
-1+6i -9-1i +6+8i -7-1i -7-3i -7+8i -1-1i 
+2-1i +6+4i +6-1i -9-1i -7+8i +4+8i -3-1i 
+2+2i -7+4i -5-7i -5+2i -5-9i -7-7i +2-9i 


 Press return to continue
 Press X      to stop