template-generic matrix of M by N doubles More...
Public Member Functions | |
Matrix () | |
mandatory | |
Matrix (double const (*array)[N]) | |
construct from an array | |
Matrix< M, N > | operator+ (Matrix< M, N > const &b) const |
add two matrices | |
Matrix< M, N > | operator- (Matrix< M, N > const &b) const |
subtract two matrices | |
Matrix< M, N > | operator* (double s) const |
multiply a matrix by a scalar | |
Matrix< M, N > | operator/ (double s) const |
divide a matrix by a scalar | |
Vector< M > | operator* (Vector< N > const &b) const |
multiply a matrix by a vector | |
template<std::size_t O> | |
Matrix< M, O > | operator* (Matrix< N, O > const &b) const |
multiply two matrices |
template-generic matrix of M by N doubles
see apf::Vector for the rationale on templating. In short, this class is designed to handle matrices whose small sizes are known at compile time. They should be used in a functional programming style
For matrices sized at runtime, see apf::DynamicMatrix. For sparse structures or parallel matrices, look outside of APF.
for those interested in software design, notice how Array and Vector come together to form Matrix
Matrix<M,O> apf::Matrix< M, N >::operator* | ( | Matrix< N, O > const & | b | ) | const [inline] |
multiply two matrices
the extra template parameter generates code for all possible combinations of matrix sizes