+
+
Namespace containing functions that operate on matrices.
+More...
+
+ |
+template<int M, int N, class T > |
+Matrix< N, M, T > | transpose (const Matrix< M, N, T > &m) |
+ | Transposes a matrix and returns the result. More...
|
+ |
+template<int R, class T > |
+T | dot (const Matrix< R, 1, T > &m1, const Matrix< R, 1, T > &m2) |
+ | Returns the dot product between two vectors. More...
|
+ |
+template<int M, int N, int P, int Q, class T > |
+Matrix< M, Q, T > | multiply (const Matrix< M, N, T > &m1, const Matrix< P, Q, T > &m2) |
+ | Multiplies two matrices together. More...
|
+ |
+
+
+
Implementations defined here are meant to operate on anything that inherits from the base Matrix class.
+
+
+
+
+
+template<int R, class T >
+
+
+ T yage::matrix::dot |
+ ( |
+ const Matrix< R, 1, T > & |
+ m1, |
+
+
+ |
+ |
+ const Matrix< R, 1, T > & |
+ m2 |
+
+
+ |
+ ) |
+ | |
+
+
+
+
+
+
+
+
+template<int M, int N, int P, int Q, class T >
+
+
+ Matrix<M, Q, T> yage::matrix::multiply |
+ ( |
+ const Matrix< M, N, T > & |
+ m1, |
+
+
+ |
+ |
+ const Matrix< P, Q, T > & |
+ m2 |
+
+
+ |
+ ) |
+ | |
+
+
+
+
- Parameters
-
+
+
+
+
Requires the two matrices to be compatible with multiplication.
+
- Todo:
- Think if this should be a static_assert.
+
Performs multiplication by getting the rows and columns, transposing one of them and then doting the result.
+
+
+
+
+
+
+
+template<int M, int N, class T >
+
+
+ Matrix<N, M, T> yage::matrix::transpose |
+ ( |
+ const Matrix< M, N, T > & |
+ m | ) |
+ |
+
+
+
+
+