PIPS
matrix.c
Go to the documentation of this file.
1 /*
2 
3  $Id: matrix.c 1671 2019-06-26 19:14:11Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of Linear/C3 Library.
8 
9  Linear/C3 Library is free software: you can redistribute it and/or modify it
10  under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  Linear/C3 Library is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with Linear/C3 Library. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 
25  /* package matrix */
26 
27 #ifdef HAVE_CONFIG_H
28  #include "config.h"
29 #endif
30 
31 #include <stdio.h>
32 #include <stdlib.h>
33 #include <stdlib.h>
34 #include "linear_assert.h"
35 
36 #include "boolean.h"
37 #include "arithmetique.h"
38 
39 #include "matrix.h"
40 
41 Value * matrix_elem_ref(Pmatrix M, int r, int c)
42 {
43  assert(M != NULL && M->coefficients != NULL);
44  assert(1 <= r && r <= M->number_of_lines);
45  assert(1 <= c && c <= M->number_of_columns);
46  return &(MATRIX_ELEM(M, r, c));
47 }
48 
49 Value matrix_elem(Pmatrix M, int r, int c)
50 {
51  assert(M != NULL && M->coefficients != NULL);
52  assert(1 <= r && r <= M->number_of_lines);
53  assert(1 <= c && c <= M->number_of_columns);
54  // return M->coefficients[(c-1) * M->number_of_lines + r - 1];
55  return MATRIX_ELEM(M, r, c);
56 }
57 
58 /* void matrix_transpose(Pmatrix a, Pmatrix a_t):
59  * transpose an (nxm) rational matrix a into a (mxn) rational matrix a_t
60  *
61  * t
62  * At := A ;
63  */
65 {
66  /* verification step */
67  int m = MATRIX_NB_LINES(A);
68  int n = MATRIX_NB_COLUMNS(A);
69  assert(n >= 0 && m >= 0);
70 
71  /* copy from a to a_t */
73  int i, j;
74  for(i=1; i<=m; i++)
75  for(j=1; j<=n; j++)
76  MATRIX_ELEM(At,j,i) = MATRIX_ELEM(A,i,j);
77 }
78 
79 /* void matrix_multiply(Pmatrix a, Pmatrix b, Pmatrix c):
80  * multiply rational matrix a by rational matrix b and store result in matrix c
81  *
82  * a is a (pxq) matrix, b a (qxr) and c a (pxr)
83  *
84  * c := a x b ;
85  *
86  * Algorithm used is directly from definition, and space has to be
87  * provided for output matrix c by caller. Matrix c is not necessarily
88  * normalized: its denominator may divide all its elements
89  * (see matrix_normalize()).
90  *
91  * Precondition: p > 0; q > 0; r > 0;
92  * c != a; c != b; -- aliasing between c and a or b
93  * -- is not supported
94  */
95 void matrix_multiply(const Pmatrix a, const Pmatrix b, Pmatrix c)
96 {
97  /* validate dimensions */
98  int p = MATRIX_NB_LINES(a);
99  int q = MATRIX_NB_COLUMNS(a);
100  int r = MATRIX_NB_COLUMNS(b);
101  // should check that all dimensions are compatible & well allocated?!
102 
103  assert(p > 0 && q > 0 && r > 0);
104  /* simplified aliasing test */
105  assert(c != a && c != b);
106 
107  /* set denominator */
108  MATRIX_DENOMINATOR(c) =
110 
111  /* use ordinary school book algorithm */
112  int i, j, k;
113  for(i=1; i<=p; i++) {
114  for(j=1; j<=r; j++) {
115  Value v = VALUE_ZERO;
116  for(k=1; k<=q; k++) {
117  Value va = MATRIX_ELEM(a, i, k);
118  Value vb = MATRIX_ELEM(b, k, j);
119  value_addto(v, value_mult(va, vb));
120  }
121  MATRIX_ELEM(c, i, j) = v;
122  }
123  }
124 }
125 
126 /* void matrix_normalize(Pmatrix a)
127  *
128  * A rational matrix is stored as an integer one with one extra
129  * integer, the denominator for all the elements. To normalise the
130  * matrix in this sense means to reduce this denominator to the
131  * smallest positive number possible. All elements are also reduced
132  * to their smallest possible value.
133  *
134  * Precondition: MATRIX_DENOMINATOR(a)!=0
135  */
137 {
138  int m = MATRIX_NB_LINES(a);
139  int n = MATRIX_NB_COLUMNS(a);
140  assert(MATRIX_DENOMINATOR(a) != 0);
141 
142  /* we must find the GCD of all elements of matrix */
143  Value factor = MATRIX_DENOMINATOR(a);
144 
145  int i, j;
146  for(i=1; i<=m; i++)
147  for(j=1; j<=n; j++)
148  factor = pgcd(factor, MATRIX_ELEM(a,i,j));
149 
150  /* factor out */
151  if (value_notone_p(factor)) {
152  for(i=1; i<=m; i++)
153  for(j=1; j<=n; j++)
154  value_division(MATRIX_ELEM(a,i,j), factor);
156  }
157 
158  /* ensure denominator is positive */
159  /* FI: this code is useless because pgcd()always return a positive integer,
160  even if a is the null matrix; its denominator CANNOT be 0 */
162 
163 /*
164  if(MATRIX_DENOMINATOR(a) < 0) {
165  MATRIX_DENOMINATOR(a) = MATRIX_DENOMINATOR(a)*-1;
166  for(loop1=1; loop1<=n; loop1++)
167  for(loop2=1; loop2<=m; loop2++)
168  MATRIX_ELEM(a,loop1,loop2) =
169  -1 * MATRIX_ELEM(a,loop1,loop2);
170  }*/
171 }
172 
173 /* void matrix_normalizec(Pmatrix MAT):
174  * Normalisation des coefficients de la matrice MAT, i.e. division des
175  * coefficients de la matrice MAT et de son denominateur par leur pgcd
176  *
177  * La matrice est modifiee.
178  *
179  * Les parametres de la fonction :
180  *
181  *!int MAT[] : matrice de dimension (n,m)
182  * int n : nombre de lignes de la matrice
183  * int m : nombre de colonnes de la matrice
184  *
185  * ??? matrix is supposed to be positive?
186  */
188 {
189  int m = MATRIX_NB_LINES(MAT);
190  int n = MATRIX_NB_COLUMNS(MAT);
191  assert( n>0 && m>0);
192 
193  Value a = MATRIX_DENOMINATOR(MAT);
194  int i;
195  for (i = 0; i<m*n && value_gt(a, VALUE_ONE); i++)
196  a = pgcd(a, MAT->coefficients[i]);
197 
198  if (value_gt(a,VALUE_ONE)) {
199  for (i = 0; i<m*n; i++)
200  value_division(MAT->coefficients[i],a);
201  }
202 }
203 
204 /* void matrix_swap_columns(Pmatrix a, int c1, int c2):
205  * exchange columns c1,c2 of an (nxm) rational matrix
206  *
207  * Precondition: n > 0; m > 0; 0 < c1 <= m; 0 < c2 <= m;
208  */
209 void matrix_swap_columns(Pmatrix A, int c1, int c2)
210 {
211  int m = MATRIX_NB_LINES(A);
212  int n = MATRIX_NB_COLUMNS(A);
213  assert(n > 0 && m > 0);
214  assert(0 < c1 && c1 <= n);
215  assert(0 < c2 && c2 <= n);
216 
217  int i;
218  for(i=1; i<=m; i++) {
219  Value temp = MATRIX_ELEM(A,i,c1);
220  MATRIX_ELEM(A,i,c1) = MATRIX_ELEM(A,i,c2);
221  MATRIX_ELEM(A,i,c2) = temp;
222  }
223 }
224 
225 /* void matrix_swap_rows(Pmatrix a, int r1, int r2):
226  * exchange rows r1 and r2 of an (nxm) rational matrix a
227  *
228  * Precondition: n > 0; m > 0; 1 <= r1 <= n; 1 <= r2 <= n
229  */
230 void matrix_swap_rows(Pmatrix A, int r1, int r2)
231 {
232  int m = MATRIX_NB_LINES(A);
233  int n = MATRIX_NB_COLUMNS(A);
234  assert(n > 0);
235  assert(m > 0);
236  assert(0 < r1 && r1 <= m);
237  assert(0 < r2 && r2 <= m);
238 
239  int i;
240  for(i=1; i<=n; i++) {
241  Value temp = MATRIX_ELEM(A,r1,i);
242  MATRIX_ELEM(A,r1,i) = MATRIX_ELEM(A,r2,i);
243  MATRIX_ELEM(A,r2,i) = temp;
244  }
245 }
246 
247 /* void matrix_assign(Pmatrix A, Pmatrix B)
248  * Copie de la matrice A dans la matrice B
249  *
250  * Les parametres de la fonction :
251  *
252  * int A[] : matrice
253  *!int B[] : matrice
254  * int n : nombre de lignes de la matrice
255  * int m : nombre de colonnes de la matrice
256  *
257  * Ancien nom: matrix_dup
258  */
260 {
261  int m = MATRIX_NB_LINES(A);
262  int n = MATRIX_NB_COLUMNS(A);
263  int i;
264  for (i=0 ; i<m*n; i++)
265  B->coefficients[i] = A->coefficients[i];
266 }
267 
268 /* bool matrix_equality(Pmatrix A, Pmatrix B)
269  * test de l'egalite de deux matrices A et B; elles doivent avoir
270  * ete normalisees au prealable pour que le test soit mathematiquement
271  * exact
272  */
274 {
275  int m = MATRIX_NB_LINES(A);
276  int n = MATRIX_NB_COLUMNS(A);
277  int i;
278  for (i = 0 ; i < m*n; i++)
279  if (B->coefficients[i] != A->coefficients[i])
280  return false;
281  return true;
282 }
283 
284 /* void matrix_nulle(Pmatrix Z):
285  * Initialisation de la matrice Z a la valeur matrice nulle
286  *
287  * Post-condition:
288  *
289  * QQ i dans [1..n]
290  * QQ j dans [1..n]
291  * Z(i,j) == 0
292  */
294 {
295  int m = MATRIX_NB_LINES(Z);
296  int n = MATRIX_NB_COLUMNS(Z);
297  int i,j;
298  for (i=1; i<=m; i++)
299  for (j=1; j<=n; j++)
300  MATRIX_ELEM(Z,i,j) = VALUE_ZERO;
302 }
303 
304 /* bool matrix_nulle_p(Pmatrix Z):
305  * test de nullite de la matrice Z
306  *
307  * QQ i dans [1..n]
308  * QQ j dans [1..n]
309  * Z(i,j) == 0
310  */
312 {
313  int m = MATRIX_NB_LINES(Z);
314  int n = MATRIX_NB_COLUMNS(Z);
315  int i, j;
316  for (i=1; i<=m; i++)
317  for (j=1; j<=n; j++)
318  if (MATRIX_ELEM(Z,i,j) != VALUE_ZERO)
319  return false;
320  return true;
321 }
322 
323 /* bool matrix_diagonal_p(Pmatrix Z):
324  * test de nullite de la matrice Z
325  *
326  * QQ i dans [1..n]
327  * QQ j dans [1..n]
328  * Z(i,j) == 0 && i != j || i == j
329  *
330  * Les parametres de la fonction :
331  *
332  * int Z[] : matrice
333  * int n : nombre de lignes de la matrice
334  * int m : nombre de colonnes de la matrice
335  */
337 {
338  int i,j;
339  int m = MATRIX_NB_LINES(Z);
340  int n = MATRIX_NB_COLUMNS(Z);
341  for (i=1;i<=m;i++)
342  for (j=1;j<=n;j++)
343  if(i!=j && MATRIX_ELEM(Z,i,j)!=0)
344  return false;
345  return true;
346 }
347 
348 /* bool matrix_triangular_p(Pmatrix Z, bool inferieure):
349  * test de triangularite de la matrice Z
350  *
351  * si inferieure == true
352  * QQ i dans [1..n]
353  * QQ j dans [i+1..m]
354  * Z(i,j) == 0
355  *
356  * si inferieure == false (triangulaire superieure)
357  * QQ i dans [1..n]
358  * QQ j dans [1..i-1]
359  * Z(i,j) == 0
360  *
361  * Les parametres de la fonction :
362  *
363  * int Z[] : matrice
364  * int n : nombre de lignes de la matrice
365  * int m : nombre de colonnes de la matrice
366  */
367 bool matrix_triangular_p(Pmatrix Z, bool inferieure)
368 {
369  int m = MATRIX_NB_LINES(Z);
370  int n = MATRIX_NB_COLUMNS(Z);
371  int i,j;
372  for (i=1; i<=m; i++)
373  if(inferieure) {
374  for (j=i+1; j<=n; j++)
375  if(MATRIX_ELEM(Z,i,j)!=0)
376  return false;
377  }
378  else
379  for (j=1; j<=i-1; j++)
380  if(MATRIX_ELEM(Z,i,j)!=0)
381  return false;
382  return true;
383 }
384 
385 /* bool matrix_triangular_unimodular_p(Pmatrix Z, bool inferieure)
386  * test de la triangulaire et unimodulaire de la matrice Z.
387  * si inferieure == true
388  * QQ i dans [1..n]
389  * QQ j dans [i+1..n]
390  * Z(i,j) == 0
391  * i dans [1..n]
392  * Z(i,i) == 1
393  *
394  * si inferieure == false (triangulaire superieure)
395  * QQ i dans [1..n]
396  * QQ j dans [1..i-1]
397  * Z(i,j) == 0
398  * i dans [1..n]
399  * Z(i,i) == 1
400  * les parametres de la fonction :
401  * matrice Z : la matrice entre
402  */
403 bool matrix_triangular_unimodular_p(Pmatrix Z, bool inferieure)
404 {
405  int m = MATRIX_NB_LINES(Z);
406  assert(MATRIX_NB_COLUMNS(Z) == m);
407  bool triangulaire = matrix_triangular_p(Z,inferieure);
408  if (triangulaire) {
409  int i;
410  for(i=1; i<=m; i++)
411  if (value_notone_p(MATRIX_ELEM(Z,i,i)))
412  return false;
413  return true;
414  }
415  else
416  return false;
417 }
418 
419 /* void matrix_substract(Pmatrix a, Pmatrix b, Pmatrix c):
420  * substract rational matrix c from rational matrix b and store result
421  * in matrix a
422  *
423  * a is a (nxm) matrix, b a (nxm) and c a (nxm)
424  *
425  * a = b - c ;
426  *
427  * Algorithm used is directly from definition, and space has to be
428  * provided for output matrix a by caller. Matrix a is not necessarily
429  * normalized: its denominator may divide all its elements
430  * (see matrix_normalize()).
431  *
432  * Precondition: n > 0; m > 0;
433  * Note: aliasing between a and b or c is supported
434  */
436 {
437  Value d1,d2; /* denominators of b, c */
438  Value lcm; /* ppcm of b,c */
439  int i,j;
440 
441  /* precondition */
442  int m = MATRIX_NB_LINES(a);
443  int n = MATRIX_NB_COLUMNS(a);
444  assert(n>0 && m>0);
447 
448  d1 = MATRIX_DENOMINATOR(b);
449  d2 = MATRIX_DENOMINATOR(c);
450  if (value_eq(d1,d2)){
451  for (i=1; i<=m; i++)
452  for (j=1; j<=n; j++)
453  MATRIX_ELEM(a,i,j) =
454  value_minus(MATRIX_ELEM(b,i,j),MATRIX_ELEM(c,i,j));
455  MATRIX_DENOMINATOR(a) = d1;
456  }
457  else {
458  lcm = ppcm(d1,d2);
459  d1 = value_div(lcm,d1);
460  d2 = value_div(lcm,d2);
461  for (i=1; i<=m; i++)
462  for (j=1; j<=n; j++)
463  MATRIX_ELEM(a,i,j) =
465  value_mult(MATRIX_ELEM(c,i,j),d2));
466  MATRIX_DENOMINATOR(a) = lcm;
467  }
468 }
469 
470 /* a = b + c */
472 {
473  /* precondition */
474  int m = MATRIX_NB_LINES(a);
475  int n = MATRIX_NB_COLUMNS(a);
476  assert(n>0 && m>0);
479 
480  Value d1 = MATRIX_DENOMINATOR(b);
481  Value d2 = MATRIX_DENOMINATOR(c);
482  if (value_eq(d1,d2)){
483  int i, j;
484  for (i=1; i<=m; i++)
485  for (j=1; j<=n; j++)
486  MATRIX_ELEM(a,i,j) =
487  value_plus(MATRIX_ELEM(b,i,j),MATRIX_ELEM(c,i,j));
488  MATRIX_DENOMINATOR(a) = d1;
489  }
490  else{
491  Value lcm = ppcm(d1, d2);
492  d1 = value_div(lcm,d1);
493  d2 = value_div(lcm,d2);
494  int i, j;
495  for (i=1; i<=m; i++) {
496  for (j=1; j<=n; j++) {
497  Value t1 = value_mult(MATRIX_ELEM(b,i,j),d1);
498  Value t2 = value_mult(MATRIX_ELEM(c,i,j),d2);
499  MATRIX_ELEM(a,i,j) = value_plus(t1,t2);
500  }
501  }
502  MATRIX_DENOMINATOR(a) = lcm;
503  }
504 }
505 
506 /* void matrix_subtraction_column(Pmatrix MAT,int c1,int c2,int x):
507  * Soustrait x fois la colonne c2 de la colonne c1
508  * Precondition: n > 0; m > 0; 0 < c1, c2 < m;
509  * Effet: c1[0..n-1] = c1[0..n-1] - x*c2[0..n-1].
510  *
511  * Les parametres de la fonction :
512  *
513  * int MAT[] : matrice
514  * int c1 : numero du colonne
515  * int c2 : numero du colonne
516  * int x :
517  */
518 void matrix_subtraction_column(Pmatrix MAT, int c1, int c2, Value x)
519 {
520  int m = MATRIX_NB_LINES(MAT);
521  int i;
522  for (i=1; i<=m; i++)
523  value_substract(MATRIX_ELEM(MAT,i,c1),
524  value_mult(x, MATRIX_ELEM(MAT,i,c2)));
525 }
526 
527 /* void matrix_subtraction_line(Pmatrix MAT,int r1,int r2,int x):
528  * Soustrait x fois la ligne r2 de la ligne r1
529  * Precondition: n > 0; m > 0; 0 < r1, r2 < n;
530  * Effet: r1[0..m-1] = r1[0..m-1] - x*r2[0..m-1]
531  *
532  * Les parametres de la fonction :
533  *
534  * int MAT[] : matrice
535  * int n : nombre de lignes de la matrice
536  * int m : nombre de colonnes de la matrice
537  * int r1 : numero du ligne
538  * int r2 : numero du ligne
539  * int x :
540  */
541 void matrix_subtraction_line(Pmatrix MAT, int r1, int r2, Value x)
542 {
543  int n = MATRIX_NB_COLUMNS(MAT);
544  int i;
545  for (i=1; i<=n; i++)
546  value_substract(MATRIX_ELEM(MAT,r1,i),
547  value_mult(x,MATRIX_ELEM(MAT,r2,i)));
548 }
549 
550 /* void matrix_uminus(A, mA)
551  *
552  * computes mA = - A
553  *
554  * input: A, larger allocated mA
555  * output: none
556  * modifies: mA
557  */
559 {
562 
563  int i,j;
564  for (i=1; i<=MATRIX_NB_LINES(A); i++)
565  for (j=1; j<=MATRIX_NB_COLUMNS(A); j++)
566  MATRIX_ELEM(mA, i, j) = value_uminus(MATRIX_ELEM(A, i, j));
567 }
568 
569 /* that is all
570  */
#define value_pos_p(val)
#define VALUE_ZERO
#define value_minus(v1, v2)
#define value_gt(v1, v2)
#define pgcd(a, b)
Pour la recherche de performance, selection d'une implementation particuliere des fonctions.
#define value_uminus(val)
unary operators on values
#define value_notone_p(val)
int Value
#define value_addto(ref, val)
#define value_eq(v1, v2)
bool operators on values
#define value_division(ref, val)
#define value_plus(v1, v2)
binary operators on values
#define VALUE_ONE
#define value_substract(ref, 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)
Value ppcm(Value, Value)
ppcm.c
Definition: ppcm.c:42
#define B(A)
Definition: iabrev.h:61
#define MATRIX_NB_LINES(matrix)
Definition: matrix-local.h:87
#define MATRIX_NB_COLUMNS(matrix)
Definition: matrix-local.h:88
#define MATRIX_DENOMINATOR(matrix)
int MATRIX_DENONIMATOR(matrix): acces au denominateur global d'une matrice matrix
Definition: matrix-local.h:86
#define MATRIX_ELEM(matrix, i, j)
Macros d'acces aux elements d'une matrice.
Definition: matrix-local.h:80
bool matrix_nulle_p(Pmatrix Z)
bool matrix_nulle_p(Pmatrix Z): test de nullite de la matrice Z
Definition: matrix.c:311
void matrix_normalizec(Pmatrix MAT)
void matrix_normalizec(Pmatrix MAT): Normalisation des coefficients de la matrice MAT,...
Definition: matrix.c:187
void matrix_nulle(Pmatrix Z)
void matrix_nulle(Pmatrix Z): Initialisation de la matrice Z a la valeur matrice nulle
Definition: matrix.c:293
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...
Definition: matrix.c:230
void matrix_substract(Pmatrix a, Pmatrix b, Pmatrix c)
void matrix_substract(Pmatrix a, Pmatrix b, Pmatrix c): substract rational matrix c from rational mat...
Definition: matrix.c:435
bool matrix_equality(Pmatrix A, Pmatrix B)
bool matrix_equality(Pmatrix A, Pmatrix B) test de l'egalite de deux matrices A et B; elles doivent a...
Definition: matrix.c:273
Value * matrix_elem_ref(Pmatrix M, int r, int c)
package matrix
Definition: matrix.c:41
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...
Definition: matrix.c:209
void matrix_uminus(Pmatrix A, Pmatrix mA)
void matrix_uminus(A, mA)
Definition: matrix.c:558
bool matrix_diagonal_p(Pmatrix Z)
bool matrix_diagonal_p(Pmatrix Z): test de nullite de la matrice Z
Definition: matrix.c:336
void matrix_add(Pmatrix a, Pmatrix b, Pmatrix c)
a = b + c
Definition: matrix.c:471
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...
Definition: matrix.c:518
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 ...
Definition: matrix.c:95
void matrix_normalize(Pmatrix a)
void matrix_normalize(Pmatrix a)
Definition: matrix.c:136
void matrix_assign(Pmatrix A, Pmatrix B)
void matrix_assign(Pmatrix A, Pmatrix B) Copie de la matrice A dans la matrice B
Definition: matrix.c:259
bool matrix_triangular_unimodular_p(Pmatrix Z, bool inferieure)
bool matrix_triangular_unimodular_p(Pmatrix Z, bool inferieure) test de la triangulaire et unimodulai...
Definition: matrix.c:403
bool matrix_triangular_p(Pmatrix Z, bool inferieure)
bool matrix_triangular_p(Pmatrix Z, bool inferieure): test de triangularite de la matrice Z
Definition: matrix.c:367
void matrix_transpose(const Pmatrix A, Pmatrix At)
void matrix_transpose(Pmatrix a, Pmatrix a_t): transpose an (nxm) rational matrix a into a (mxn) rati...
Definition: matrix.c:64
Value matrix_elem(Pmatrix M, int r, int c)
Definition: matrix.c:49
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...
Definition: matrix.c:541
#define assert(ex)
Definition: newgen_assert.h:41
static char * x
Definition: split_file.c:159
Definition: pip__tab.h:25
package matrice
Definition: matrix-local.h:63
Value * coefficients
Definition: matrix-local.h:67