0.9.9 API documenation
matrix_factorisation.hpp
Go to the documentation of this file.
1 
13 #pragma once
14 
15 // Dependency:
16 #include "../glm.hpp"
17 
18 #ifndef GLM_ENABLE_EXPERIMENTAL
19 # error "GLM: GLM_GTX_matrix_factorisation is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
20 #endif
21 
22 #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
23 # pragma message("GLM: GLM_GTX_matrix_factorisation extension included")
24 #endif
25 
26 /*
27 Suggestions:
28  - Move helper functions flipud and fliplr to another file: They may be helpful in more general circumstances.
29  - Implement other types of matrix factorisation, such as: QL and LQ, L(D)U, eigendecompositions, etc...
30 */
31 
32 namespace glm
33 {
36 
39  template <length_t C, length_t R, typename T, qualifier P, template<length_t, length_t, typename, qualifier> class matType>
40  GLM_FUNC_DECL matType<C, R, T, P> flipud(matType<C, R, T, P> const& in);
41 
44  template <length_t C, length_t R, typename T, qualifier P, template<length_t, length_t, typename, qualifier> class matType>
45  GLM_FUNC_DECL matType<C, R, T, P> fliplr(matType<C, R, T, P> const& in);
46 
51  template <length_t C, length_t R, typename T, qualifier P, template<length_t, length_t, typename, qualifier> class matType>
52  GLM_FUNC_DECL void qr_decompose(matType<C, R, T, P> const& in, matType<(C < R ? C : R), R, T, P>& q, matType<C, (C < R ? C : R), T, P>& r);
53 
59  template <length_t C, length_t R, typename T, qualifier P, template<length_t, length_t, typename, qualifier> class matType>
60  GLM_FUNC_DECL void rq_decompose(matType<C, R, T, P> const& in, matType<(C < R ? C : R), R, T, P>& r, matType<C, (C < R ? C : R), T, P>& q);
61 
63 }
64 
65 #include "matrix_factorisation.inl"
GLM_FUNC_DECL void qr_decompose(matType< C, R, T, P > const &in, matType<(C< R?C:R), R, T, P > &q, matType< C,(C< R?C:R), T, P > &r)
Performs QR factorisation of a matrix.
GLM_FUNC_DECL void rq_decompose(matType< C, R, T, P > const &in, matType<(C< R?C:R), R, T, P > &r, matType< C,(C< R?C:R), T, P > &q)
Performs RQ factorisation of a matrix.
GLM_FUNC_DECL matType< C, R, T, P > fliplr(matType< C, R, T, P > const &in)
Flips the matrix columns right and left.
Definition: _noise.hpp:11
GLM_FUNC_DECL matType< C, R, T, P > flipud(matType< C, R, T, P > const &in)
Flips the matrix rows up and down.