Application

Installer et compiler ce fichier dans votre répertoire de travail.

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = rdefinite_positive_mZ( i_mZ(r,r), 99);

  clrscrn();
  printf(" Copy/Past into the octave windows \n\n");
  p_Octave_mZ(A,"a",P9,P9);
  printf(" inva = cholinv (a)\n\n"
         " a*inva\n\n"
         " inva*a\n\n");

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

  srand(time(&t));

do
{
 fun(R4);

} while(stop_w());

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


Factorisation de Cholesky : inva = cholinv(a)


Exemple de sortie écran :

 Copy/Past into the octave windows 

 a=[
+34.535298944-0.000000000*i,-8.370626157-3.834025539*i,-2.284523193+4.428116666*i,-0.237463562+3.247676343*i;
-8.370626157+3.834025539*i,+30.321842905+0.000000000*i,+3.778744958+13.075172218*i,-7.751512009-5.243134220*i;
-2.284523193-4.428116666*i,+3.778744958-13.075172218*i,+35.022878515-0.000000000*i,-0.382882954+0.040543902*i;
-0.237463562-3.247676343*i,-7.751512009+5.243134220*i,-0.382882954-0.040543902*i,+29.119979635+0.000000000*i]

 inva = cholinv (a)

 a*inva

 inva*a


 Press   return to continue
 Press X return to stop