next up previous contents
Next: Polyhedra Up: Matrix operations Previous: Matrix operations   Contents

Main functions in Matop.c, matrix.c and NormalForms.c

Matrix * Matrix_Alloc
(unsigned NbRows, unsigned NbColumns): allocate space for matrix of dimensions 'NbRows x NbColumns'.

void Matrix_Free
(Matrix *Mat): free the memory space occupied by Matrix 'Mat'.

void Matrix_Print
(FILE *Dst, char *Format, Matrix *Mat): print the contents of the Matrix 'Mat'.

void Matrix_Read_Input
(Matrix *Mat): read the contents of the Matrix 'Mat'.

Matrix * Matrix_Read
(void) : read the contents of the matrix 'Mat' from standard input.

static int [hermite](Matrix *H, Matrix *U, Matrix *Q): basic hermite engine.

int MatInverse
(Matrix *Mat, Matrix *MatInv ): given a integer matrix 'Mat', compute its inverse rational matrix 'MatInv'.

void rat_prodmat
(Matrix *S, Matrix *X, Matrix *P): compute the matrix product between an integer matrix and a rational one.

void Matrix_Vector_Product
(Matrix *Mat, Value *p1, Value *p2): compute the matrix-vector product.

void Vector_Matrix_Product
(Value *p1, Matrix *Mat, Value *p2): compute the vector-matrix product.

void Matrix_Product
(Matrix *Mat1, Matrix *Mat2, Matrix *Mat3): compute the matrix-matrix product.

int Matrix_Inverse
(Matrix *Mat, Matrix *MatInv ): given a rational matrix 'Mat', compute its inverse rational matrix 'MatInv'.

static void transpose
(Value *a, int n, int q): transpose a part of a matrix.

static int encore
(Value *a, int n, int p, int q, Value val): find a non-divisible element in a part of a matrix.

static void smith
(Value *a, Value *b, Value *c, Value *b_inverse, Value *c_inverse, int n, int p, int q): find the Smith Normal Form of a matrix.

void ExchangeRows
(Matrix *M, int Row1, int Row2) : exchange the rows 'Row1' and 'Row2' of the matrix 'M'.

void ExchangeColumns
(Matrix *M, int Column1, int Column2): exchange the columns 'Column1' and 'Column2' of the matrix 'M'.

Matrix * Transpose
(Matrix *A): compute the transpose of a matrix.

int findHermiteBasis
(Matrix *M, Matrix **Result): compute the Hermite basis for a matrix.

Matrix * Identity
(unsigned size): return an identity matrix of size 'size'.

Bool isinHnf
(Matrix *A) : check if the matrix 'A' is in Hermite normal form.

Matrix * AddANullRow
] (Matrix *M): add a row of zeros at the end of a matrix.

Matrix * RemoveColumn
(Matrix *M, int Columnnumber): remove a column from the matrix.


next up previous contents
Next: Polyhedra Up: Matrix operations Previous: Matrix operations   Contents
Sorin Olaru 2002-04-24