© 2009,2012 John Abbott
GNU Free Documentation License, Version 1.2

CoCoALib Documentation Index

User documentation for MatrixOperations

MatrixOperations gathers together a number of operations on matrices; in most cases these operations are happy to accept a MatrixView (see MatrixView) as argument.

When not specified, a matrix argument is of type ConstMatrixView.

There are two ways of multiplying two matrices together. The infix operators return a DenseMatrix; the procedural version may be slightly faster than the infix operator.

Here are some matrix norms. The result is an element of the ring containing the matrix elements. Note that FrobeniusNorm2 gives the square of the Frobenius norm (so that the value surely lies in the same ring).

Here are some fairly standard functions on matrices.

Here are some standard operations where the method used is specified explicitly. It would usually be better to use the generic operations above, as those should automatically select the most appropriate method for the given matrix.

Maintainer documentation for MatrixOperations

Most impls are quite straightforward.

power is slightly clever with its iterative impl of binary powering.

LinSolveByGauss is a little complicated because it tries to handle all cases (e.g. full rank or not, square or more rows than cols or more cols than rows)

Bugs, Shortcomings and other ideas

Can we make a common "gaussian elimination" impl which is called by the various algorithms needing it, rather than having several separate implementations?

Is the procedure mul really any faster than the infix operator?

Main changes