42 #define MALLOC(s,t,f) malloc((unsigned)(s))
43 #define FREE(s,t,f) free((char *)(s))
96 if ((n_min == 0) && (m_min == 0))
100 if (n_min >
level +1) {
105 (void)
printf (
" apres alignement du plus petit element a la premiere ligne \n");
108 if (m_min >1+
level) {
113 (void)
printf (
" apres alignement du plus petit element a la premiere colonne\n");
119 for (i=
level+2; i<=m; i++) {
126 for(i=
level+2;i<=n;i++) {
133 (void)
printf(
"apres division par A(%d,%d) des termes de la %d-ieme ligne et de la %d-em colonne \n",
level+1,
level+1,
level+1,
level+1);
142 (void)
printf (
" la matrice D apres transformation est la suivante :");
145 (void)
printf (
" la matrice P est \n");
148 (void)
printf (
" la matrice Q est \n");
216 for(j=1; j <= m; j++)
220 for(j=1; j <= n && j <= m; j++) {
233 for(j=k+1; j <= n; j++) {
246 for(j=1; j <= k; j++) {
252 for(j=k+1; j <= m; j++) {
262 *c_p =
modulo(*c_p, *gcd_p);
#define DIVIDE(x, y)
division avec reste toujours positif basee sur les equations: a/(-b) = - (a/b) (-a)/b = - ((a+b-1)/b)...
#define pgcd(a, b)
Pour la recherche de performance, selection d'une implementation particuliere des fonctions.
#define value_zero_p(val)
#define value_mult(v, w)
whether the default is protected or not this define makes no sense any more...
#define value_div(v1, v2)
#define SUB_MATRIX_ELEM(matrix, i, j, level)
MATRIX_RIGHT_INF_ELEM Permet d'acceder des sous-matrices dont le coin infe'rieur droit (i....
#define MATRIX_NB_LINES(matrix)
#define MATRIX_NB_COLUMNS(matrix)
#define MATRIX_DENOMINATOR(matrix)
int MATRIX_DENONIMATOR(matrix): acces au denominateur global d'une matrice matrix
#define MATRIX_ELEM(matrix, i, j)
Macros d'acces aux elements d'une matrice.
Pmatrix matrix_new(int m, int n)
package matrix
int matrices_to_1D_lattice(Pmatrix A, Pmatrix B, int n, int m, int i, Value *gcd_p, Value *c_p)
Under the assumption A x = B, A[n,m] and B[n], compute the 1-D lattice for x_i of x[m] as.
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...
void matrix_swap_rows(Pmatrix A, int r1, int r2)
void matrix_swap_rows(Pmatrix a, int r1, int r2): exchange rows r1 and r2 of an (nxm) rational matrix...
void matrix_swap_columns(Pmatrix A, int c1, int c2)
void matrix_swap_columns(Pmatrix a, int c1, int c2): exchange columns c1,c2 of an (nxm) rational matr...
void matrix_subtraction_column(Pmatrix MAT, int c1, int c2, Value x)
void matrix_subtraction_column(Pmatrix MAT,int c1,int c2,int x): Soustrait x fois la colonne c2 de la...
void matrix_multiply(const Pmatrix a, const Pmatrix b, Pmatrix c)
void matrix_multiply(Pmatrix a, Pmatrix b, Pmatrix c): multiply rational matrix a by rational matrix ...
void matrix_assign(Pmatrix A, Pmatrix B)
void matrix_assign(Pmatrix A, Pmatrix B) Copie de la matrice A dans la matrice B
void matrix_subtraction_line(Pmatrix MAT, int r1, int r2, Value x)
void matrix_subtraction_line(Pmatrix MAT,int r1,int r2,int x): Soustrait x fois la ligne r2 de la lig...
void matrix_print(Pmatrix)
void matrix_print(matrice a): print an (nxm) rational matrix
int matrix_line_el(Pmatrix, int)
int matrix_line_el(Pmatrix MAT, int level) renvoie le numero de colonne absolu du premier element non...
void matrix_identity(Pmatrix, int)
void matrix_identity(Pmatrix ID, int level) Construction d'une sous-matrice identity dans ID(level+1....
int matrix_col_el(Pmatrix, int)
int matrix_col_el(Pmatrix MAT, int level) renvoie le numero de ligne absolu du premier element non nu...
void matrix_min(Pmatrix, int *, int *, int)
void matrix_min(Pmatrix MAT, int * i_min, int * j_min, int level): Recherche des coordonnees (*i_min,...