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 | |
void | matrice_determinant (matrice a, int n, result) |
package matrice More... | |
void | matrice_sous_determinant (matrice a, int n, int i, int j, result) |
void matrice_sous_determinant(matrice a, int n,int i, int j, int result[]) calculate sub determinant of a matrix More... | |
package matrice
int matrice_determinant(matrice a, int n, int * result):
calculate determinant of an (nxn) rational matrix a
The result consists of two integers, a numerator result[1] and a denominator result[0].
Algorithm: integer matrix triangularisation by Hermite normal form (because the routine is available)
Complexity: O(n**3) – up to gcd computations...
Authors: Francois Irigoin, September 1989, Yi-qing Yang, January 1990 output
cette routine est FAUSSE car la factorisation de Hermite peut s'appuyer sur des matrice unimodulaires de determinant 1 ou -1. Il faudrait donc ecrire un code de calcul de determinant de matrice unimodulaire...
Ou tout reprendre avec une triangularisation rapide et n'utilisant que des matrice de determinant +1. Voir mon code des US. Cette triangularisation donnera en derivation une routine d'inversion rapide pour matrice unimodulaire
matrice_hermite expects an integer matrix
product of diagonal elements
product of determinants of three matrixs P, H, Q
free useless matrices
reduce result
n | int matrice_determinant(matrice a, int n, int * result): calculate determinant of an (nxn) rational matrix a |
The result consists of two integers, a numerator result[1] and a denominator result[0].
Algorithm: integer matrix triangularisation by Hermite normal form (because the routine is available)
Complexity: O(n**3) – up to gcd computations...
Authors: Francois Irigoin, September 1989, Yi-qing Yang, January 1990 input
Definition at line 54 of file determinant.c.
References ACCESS, assert, DENOMINATOR, matrice_free, matrice_hermite(), matrice_new, pgcd_slow(), value_division, value_minus, value_mult, value_notone_p, VALUE_ONE, and value_product.
Referenced by matrice_sous_determinant().
void matrice_sous_determinant(matrice a, int n,int i, int j, int result[]) calculate sub determinant of a matrix
The sub determinant indicated by (i,j) is the one obtained by deleting row i and column j from matrix of dimension n. The result passed back consists of two integers, a numerator result[1] and a denominator result[0].
Precondition: n >= i > 0 && n >= j > 0
Algorithm: put 0 in row i and in column j, and 1 in a[i,j], and then call matrice_determinant, restore a
Complexity: O(n**3) output
save column j
save row i, but for the (i,j) elements
restore row i
restore column j, with proper (i,j) element
n | The sub determinant indicated by (i,j) is the one obtained by deleting row i and column j from matrix of dimension n. The result passed back consists of two integers, a numerator result[1] and a denominator result[0]. |
Precondition: n >= i > 0 && n >= j > 0
Algorithm: put 0 in row i and in column j, and 1 in a[i,j], and then call matrice_determinant, restore a
Complexity: O(n**3) input matrix
i | The sub determinant indicated by (i,j) is the one obtained by deleting row i and column j from matrix of dimension n. The result passed back consists of two integers, a numerator result[1] and a denominator result[0]. |
Precondition: n >= i > 0 && n >= j > 0
Algorithm: put 0 in row i and in column j, and 1 in a[i,j], and then call matrice_determinant, restore a
Complexity: O(n**3) dimension of matrix
Definition at line 156 of file determinant.c.
References ACCESS, matrice_determinant(), matrice_free, matrice_new, and VALUE_ONE.
Referenced by matrice_triangulaire_inversion().