Public Member Functions

apf::Matrix< M, N > Class Template Reference

template-generic matrix of M by N doubles More...

List of all members.

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

Detailed Description

template<std::size_t M, std::size_t N>
class apf::Matrix< M, N >

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


Member Function Documentation

template<std::size_t M, std::size_t N>
template<std::size_t O>
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


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines