PIPS
|
#include <stdlib.h>
#include <stdio.h>
#include "linear_assert.h"
#include "boolean.h"
#include "arithmetique.h"
#include "matrice.h"
Go to the source code of this file.
Functions | |
static void | pr_quot (FILE *f, Value a, Value b __attribute__((unused))) |
package matrice More... | |
void | matrice_fprint (FILE *f, matrice a, int n, int m) |
void matrice_fprint(File * f, matrice a,n,m): print an (nxm) rational matrix More... | |
void | matrice_print (matrice a, int n, int m) |
void matrice_print(matrice a, int n, int m): print an (nxm) rational matrix More... | |
void | matrice_fscan (FILE *f, matrice *a, int *n, int *m) |
void matrice_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 matrice_fprint(File * f, matrice a,n,m): print an (nxm) rational matrix
Note: the output format is incompatible with matrice_fscan() row size
m | Note: the output format is incompatible with matrice_fscan() column size |
Definition at line 62 of file matrice_io.c.
References ACCESS, assert, DENOMINATOR, f(), fprint_Value(), fprintf(), loop1, pr_quot(), and value_notzero_p.
Referenced by average_probability_matrix(), hyperplane(), interactive_partitioning_matrix(), local_tile_constraints(), make_tile_constraints(), matrice_print(), parallel_tiling(), partial_broadcast_coefficients(), prototype_dimension(), sc_image_computation(), tile_hyperplane_constraints(), tile_membership(), tile_membership_constraints(), tiling_transformation(), transformer_equality_fix_point(), and unstructured_to_complexity().
void matrice_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 115 of file matrice_io.c.
References ACCESS, assert, DENOMINATOR, f(), fscan_Value(), matrice_new, value_notzero_p, and value_pos_p.
Referenced by unimodular().
void matrice_print(matrice a, int n, int m): print an (nxm) rational matrix
Note: the output format is incompatible with matrice_fscan() this should be implemented as a macro, but it's a function for dbx's sake row size
m | Note: the output format is incompatible with matrice_fscan() this should be implemented as a macro, but it's a function for dbx's sake column size |
Definition at line 90 of file matrice_io.c.
References matrice_fprint().
Referenced by matrice_smith().
package matrice
void 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
Definition at line 47 of file matrice_io.c.
References f(), fprint_Value(), fprintf(), and value_pos_p.
Referenced by matrice_fprint().