PIPS
|
#include <stdio.h>
#include <stdlib.h>
#include "linear_assert.h"
#include "boolean.h"
#include "arithmetique.h"
#include "matrix.h"
Go to the source code of this file.
Functions | |
void | matrix_fprint (FILE *f, Pmatrix a) |
package matrice More... | |
void | matrix_print (Pmatrix a) |
void matrix_print(matrice a): print an (nxm) rational matrix More... | |
void | matrix_fscan (FILE *f, Pmatrix *a, int *n, int *m) |
void matrix_fscan(FILE * f, matrice * a, int * n, int * m): read an (nxm) rational matrix in an ASCII file accessible via file descriptor f; a is allocated as a function of its number of columns and rows, n and m. More... | |
void | matrix_pr_quot (FILE *f, Value a, Value b __attribute__((unused))) |
void matrix_pr_quot(FILE * f, int a, int b): More... | |
void matrix_fprint | ( | FILE * | f, |
Pmatrix | a | ||
) |
package matrice
void matrix_fprint(File * f, matrix a): print a rational matrix
Note: the output format is compatible with matrix_fscan()
Definition at line 44 of file matrix_io.c.
References assert, f(), fprint_Value(), fprintf(), MATRIX_DENOMINATOR, MATRIX_ELEM, MATRIX_NB_COLUMNS, MATRIX_NB_LINES, and VALUE_ZERO.
Referenced by main(), make_reindex(), matrix_print(), and prepare_reindexing().
void matrix_fscan(FILE * f, matrice * a, int * n, int * m): read an (nxm) rational matrix in an ASCII file accessible via file descriptor f; a is allocated as a function of its number of columns and rows, n and m.
Format:
n m denominator a[1,1] a[1,2] ... a[1,m] a[2,1] ... a[2,m] ... a[n,m]
After the two dimensions and the global denominator, the matrix as usually displayed, line by line. Line feed can be used anywhere. Example for a (2x3) integer matrix: 2 3 1 1 2 3 4 5 6 row size
number of read elements
read dimensions
allocate a
read denominator
necessaires pour eviter les divisions par zero
pour "normaliser" un peu les representations
m | Format: |
n m denominator a[1,1] a[1,2] ... a[1,m] a[2,1] ... a[2,m] ... a[n,m]
After the two dimensions and the global denominator, the matrix as usually displayed, line by line. Line feed can be used anywhere. Example for a (2x3) integer matrix: 2 3 1 1 2 3 4 5 6 column size
Definition at line 93 of file matrix_io.c.
References assert, f(), fscan_Value(), MATRIX_DENOMINATOR, MATRIX_ELEM, matrix_new(), value_notzero_p, and value_pos_p.
Referenced by Hierarchical_tiling(), main(), Tiling2_buffer(), and Tiling_buffer_allocation().
void matrix_pr_quot(FILE * f, int a, int b):
print quotient a/b in a sensible way, i.e. add a space in front of positive number to compensate for the minus sign of negative number
FI: a quoi sert le parametre b? A quoi sert la variable d? =>ARGSUSED RGSUSED
Definition at line 137 of file matrix_io.c.
References f(), fprint_Value(), fprintf(), and value_pos_p.
void matrix_print | ( | Pmatrix | a | ) |
void matrix_print(matrice a): print an (nxm) rational matrix
Note: the output format is incompatible with matrix_fscan() this should be implemented as a macro, but it's a function for dbx's sake
Definition at line 70 of file matrix_io.c.
References matrix_fprint().
Referenced by Hierarchical_tiling(), matrix_smith(), sc_resol_smith(), smith_int(), and Tiling2_buffer().