Goto Chapter: Top 1 2 3 4 5 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

2 Gaussian Elimination
 2.1 Gaussian Elimination

2 Gaussian Elimination

2.1 Gaussian Elimination

This section describes the different variants of our implementation of the Gaussian algorithm.

Note that the value of the option numberBlocks described below has a big impact on the performance of our algorithms. For information on how to choose a suitable value for numberBlocks see Chapter 3.

2.1-1 EchelonMatTransformationBlockwise
‣ EchelonMatTransformationBlockwise( mat[, options] )( function )

Returns: a record that contains information on the echelon form of mat and the corresponding transformation matrix.

This is the main function of the GaussPar package. It computes the reduced row echelon form (RREF) of the matrix mat and the corresponding transformation matrix. In a pre-processing step, mat is split up into a block matrix whose blocks can be processed in parallel.

The input parameters have the following meaning:

The output record contains the following items:

gap> A := RandomMat(8, 5, GF(5)) * RandomMat(5, 8, GF(5));;
gap> Display(A);
1 4 3 2 4 4 3 4
4 1 2 4 2 . . 4
2 3 1 4 3 3 1 3
3 . 4 3 3 2 4 .
4 1 3 2 3 3 . 2
2 1 3 3 1 1 2 3
. 3 3 . 1 1 3 .
4 1 4 1 4 3 1 1
gap> res := EchelonMatTransformationBlockwise(A, rec(numberBlocks := 2));;
gap> Display(res.vectors);
1 . . . . . . 3
. 1 . . . 3 2 3
. . 1 . . . . 3
. . . 1 . 2 1 1
. . . . 1 2 2 2
gap> res.coeffs * A=res.vectors;
true

The transformation matrix can be easily obtained from the output record as follows:

gap> trafo := Concatenation(res.coeffs, res.relations);;
gap> Display(trafo * A);
1 . . . . . . 3
. 1 . . . 3 2 3
. . 1 . . . . 3
. . . 1 . 2 1 1
. . . . 1 2 2 2
. . . . . . . .
. . . . . . . .
. . . . . . . .

It is also possible to directly input a block matrix.

gap> A := RandomMat(8, 5, GF(5)) * RandomMat(5, 8, GF(5));;
gap> res1 := EchelonMatTransformationBlockwise(A, rec(numberBlocks := 2));;
gap> A1 := A{[1..4]}{[1..4]};;
gap> A2 := A{[1..4]}{[5..8]};;
gap> A3 := A{[5..8]}{[1..2]};;
gap> A4 := A{[5..8]}{[5..8]};;
gap> A_blockwise := [[A1,A2],[A3,A4]];;
gap> res3 := EchelonMatTransformationBlockwise(A_blockwise, 
  rec(numberBlocks := 2, isChopped := true));;
gap> res3 = res1;
true

2.1-2 EchelonMatBlockwise
‣ EchelonMatBlockwise( mat[, options] )( function )

Returns: a record that contains information on the echelon form of mat.

This is a version of the main function that computes the reduced row echelon form (RREF) of the matrix mat but doesn't compute the corresponding transformation matrix. In a pre-processing step, mat is split up into a block matrix whose blocks can be processed in parallel.

The input parameters have the following meaning:

The output record contains the items vectors and heads. For their meaning, see EchelonMatTransformationBlockwise (2.1-1).

 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 Ind

generated by GAPDoc2HTML