GAP (linboxing) - Chapter 3: Function Reference

Goto Chapter: Top 1 2 3 4 Ind
Top of Book Previous Chapter Next Chapter

3 Function Reference
3.1 Replacements for GAP functions
3.1-1 LinBox.Determinant
3.1-2 LinBox.Rank
3.1-3 LinBox.Trace
3.1-4 LinBox.SolutionMat
3.2 Miscellaneous functions
3.2-1 LinBox.SetMessages
3.2-2 MakeLinboxingDoc
3.2-3 TestLinboxing

### 3 Function Reference

#### 3.1 Replacements for GAP functions

##### 3.1-1 LinBox.Determinant

`> LinBox.Determinant`( M ) | ( function )

`> LinBox.DeterminantMat`( M ) | ( function )

`> LinBox.DeterminantIntMat`( M ) | ( function )

Returns the determinant of the square matrix M. The entries of M must be integers or over a prime field.

    gap> LinBox.DeterminantMat([[1,2,3],[4,5,6],[7,8,9]]);
    0

##### 3.1-2 LinBox.Rank

`> LinBox.Rank`( M ) | ( function )

`> LinBox.RankMat`( M ) | ( function )

Returns the maximal number of linearly-independent rows of the matrix M. The entries of M must be integers or over a prime field.

    gap> LinBox.RankMat([[1,2,3],[4,5,6],[7,8,9]]);
    2

##### 3.1-3 LinBox.Trace

`> LinBox.Trace`( M ) | ( function )

`> LinBox.TraceMat`( M ) | ( function )

For a square matrix M, returns the sum of the diagonal entries. The entries of M must be integers or over a prime field. Note that this version (unlike the others in this package) is typically slower than the GAP equivalent, but is provided for completeness.

    gap> LinBox.TraceMat([[1,2,3],[4,5,6],[7,8,9]]);
    15

##### 3.1-4 LinBox.SolutionMat

`> LinBox.SolutionMat`( M, b ) | ( function )

Returns a row vector x that is a solution of the equation xM=b, or `fail` if no solution exists. If the system is consistent, a random solution x is returned. The entries of M must be integers or over a prime field, but if they are integers then the solution may include rationals.

    gap> LinBox.SolutionMat([[1,2,3],[4,5,6],[7,8,9]], [2,1,0]);
    [ -1, -1, 1 ]
    gap> LinBox.SolutionMat([[1,2,3],[4,5,6],[7,8,9]], [2,1,0]);
    [ -5/4, -1/2, 3/4 ]

#### 3.2 Miscellaneous functions

##### 3.2-1 LinBox.SetMessages

`> LinBox.SetMessages`( on ) | ( function )

Turns on or off the printing of the LinBox library commentator messages. If the boolean argument on is set to `true` then messages will be printed, else no messages will be displayed.

##### 3.2-2 MakeLinboxingDoc

`> MakeLinboxingDoc`( [make-internal] ) | ( function )

Builds this documentation from the linboxing package source files. This should not normally need doing: the current documentation is built and included with the package release.

If the optional boolean argument make-internal is `true` then the internal (undocumented!) functions are included in this manual.

##### 3.2-3 TestLinboxing

`> TestLinboxing`( [num-tests] ) | ( function )

Test the installation of linboxing and print profiling information. This tries all the linboxing package's algorithms with random vectors and matrices over random fields (covering all the distinct supported field types). The results are compared with the equivalent GAP functions, and the relative times displayed.

The optional argument num-tests specifies how many times to run each test: the default is 5 times.

Top of Book Previous Chapter Next Chapter
Goto Chapter: Top 1 2 3 4 Ind

generated by GAPDoc2HTML