PIPS
smith.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include "arithmetique.h"
#include "matrix.h"
+ Include dependency graph for smith.c:

Go to the source code of this file.

Functions

int main (void)
 

Function Documentation

◆ main()

int main ( void  )

Definition at line 30 of file smith.c.

31 {
32  int m, n;
33  Pmatrix A, P, D, Q;
34  matrix_fscan(stdin, &A, &m, &n);
35  P = matrix_new(m, m);
36  D = matrix_new(m, n);
37  Q = matrix_new(n, n);
38  // compute Smith normal form: D = P.A.Q
39  matrix_smith(A, P, D, Q);
40  fprintf(stdout, "# A =\n");
41  matrix_fprint(stdout, A);
42  fprintf(stdout, "# P =\n");
43  matrix_fprint(stdout, P);
44  fprintf(stdout, "# D =\n");
45  matrix_fprint(stdout, D);
46  fprintf(stdout, "# Q =\n");
47  matrix_fprint(stdout, Q);
48  return 0;
49 }
#define A(i, j)
comp_matrice.c
Definition: comp_matrice.c:63
#define D(A)
Definition: iabrev.h:56
Pmatrix matrix_new(int m, int n)
package matrix
Definition: alloc.c:41
void matrix_smith(Pmatrix MAT, Pmatrix P, Pmatrix D, Pmatrix Q)
void matrix_smith(matrice MAT, matrix P, matrix D, matrix Q): Calcul de la forme reduite de Smith D d...
Definition: smith.c:68
void matrix_fprint(FILE *, Pmatrix)
matrix_io.c
Definition: matrix_io.c:44
void matrix_fscan(FILE *, Pmatrix *, int *, int *)
void matrix_fscan(FILE * f, matrice * a, int * n, int * m): read an (nxm) rational matrix in an ASCII...
Definition: matrix_io.c:93
#define Q
Definition: pip__type.h:39
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
Definition: pip__tab.h:25
package matrice
Definition: matrix-local.h:63

References A, D, fprintf(), matrix_fprint(), matrix_fscan(), matrix_new(), matrix_smith(), and Q.

+ Here is the call graph for this function: