Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Examples  

gauss.h File Reference

Some algorithms of linear algebra. More...

Go to the source code of this file.

Functions

template<class field_item> void rref (const matrix< field_item > &A, matrix< field_item > &B, matrix< field_item > &Q, vector< index > &basis, field_item &det, int movie, ostr &movie_stream)
template<class field_item> matrix< field_item > inv (const matrix< field_item > &A)
template<class field_item> field_item det (const matrix< field_item > &A)
template<class int_item> void rref_int (const matrix< int_item > &A, matrix< int_item > &B, matrix< int_item > &Q, vector< index > &basis, int_item &det, int movie, ostr &movie_stream)
template<class int_item> int_item det_int (const matrix< int_item > &A)
template<class int_item> void smith (const matrix< int_item > &A, matrix< int_item > &B, matrix< int_item > &P, matrix< int_item > &Q, index &rank, int_item &det, int movie, ostr &movie_stream)


Detailed Description

Some algorithms of linear algebra.

Bellow field_item is the type implementing an item of any field, int_item is the type implementing an integer number.

Definition in file gauss.h.


Function Documentation

template<class field_item>
field_item det const matrix< field_item > & A
 

Returns determinant of A.

Precondition: A must be square

Definition at line 219 of file gauss.h.

template<class int_item>
int_item det_int const matrix< int_item > & A
 

Returns determinant of A.

Definition at line 383 of file gauss.h.

template<class field_item>
matrix< field_item > inv const matrix< field_item > & A
 

Returns inversion of matrix A Precondition: A must be square.

Definition at line 243 of file gauss.h.

template<class field_item>
void rref const matrix< field_item > & A,
matrix< field_item > & B,
matrix< field_item > & Q,
vector< index > & basis,
field_item & det,
int movie = 0,
ostr & movie_stream = cout
 

Produces the reduced row echelon form B of a matrix A.

Returns B, Q, basis, det:

  • Q is such that B = Q * A;
  • r = basis.get_n() is the rank of A;
  • B.sumbatrix(mesh_grid(1,r), basis) is the r-by-r identity matrix;
  • det is the value of the max size left upper corner minor of A. If movie = 1 all intermidiate tables and comments are printed into movie_stream

template<class int_item>
void rref_int const matrix< int_item > & A,
matrix< int_item > & B,
matrix< int_item > & Q,
vector< index > & basis,
int_item & det,
int movie = 0,
ostr & movie_stream = cout
 

Produces the reduced row echelon form B of an integer matrix A.

Returns B, Q, basis, det:

  • Q is such that B = Q * A;
  • r = basis.get_n() is the rank of A;
  • B.sumbatrix(mesh_grid(1,r), basis) is the r-by-r non-singular diagonal matrix;
  • det is the value of the max size left upper corner minor of A.

template<class int_item>
void smith const matrix< int_item > & A,
matrix< int_item > & B,
matrix< int_item > & P,
matrix< int_item > & Q,
index & rank,
int_item & det,
int movie = 0,
ostr & movie_stream = cout
 

Produces normal diagonal form B of integer matrix A.

Returns B, P, Q, rank, det:

  • P, Q are unimodular such that B = P * A * Q;
  • rank is a rank of A;
  • det is the basis minor of A If movie = 1 all intermidiate tables and comments are printed into movie_stream


Generated at Tue Jan 22 20:37:04 2002 for Arageli by doxygen1.2.9.1 written by Dimitri van Heesch, © 1997-2001