MatrixOps

© 2009,2012,2019 John Abbott and Anna M. Bigatti
GNU Free Documentation License, Version 1.2



CoCoALib Documentation Index

User documentation for MatrixOps

MatrixOps 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.

Matrix accessors

Matrix Arithmetic

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.

Matrix norms

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).

Sundry functions

Here are some fairly standard functions on matrices.

Further sundry functions

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 MatrixOps

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

2012

2011