AnimaL |
Tutorial |
Documentation |
Thanks to the generic implementation, these methods work for all types of vectors whose entries can be accessed using operator [], and for all types of row-dominant matrices whose entries can be accessed using [ ][ ]. This includes C arrays (one-dimensional for vectors, two-dimensional for matrices) as well as std::vector (vector<vector> for matrices) and animal::Array (animal::Array<animal::Array> for matrices) and animal::Matrix.
Examples are given in linear_test.cpp.
Auxiliary external method animal::size()
is used for vectors, animal::nrows()
and animal::ncols()
are used for matrices. You can overload them to adapt them to your own types if necessary.
Conventions used in method names and parameters:
File linear.readme shows all the methods in a single table.
Modules | |
group | vector |
operations involving a single vector: assignment, norm, mutliplication with a scalar, etc. | |
group | vector-vector |
operations involving two vectors: sum, weighted sum, dot product, corss product, etc. | |
group | matrix |
Operations involving a single matrix: assignment, multiplication with a scalar, etc. | |
group | matrix-matrix |
Operations involving two matrices: all the combinations of (weigted) products (transposed or not), sum, etc. | |
group | matrix-vector |
operations involving a matrix and a vector: wheighted products, etc. | |
group | linear equation solution (and matrix inversion) |