Lines Matching refs:MATRIX

80 template<typename MATRIX>
81 MATRIX PURE gaussJordanInverse(const MATRIX& src) { in gaussJordanInverse()
82 typedef typename MATRIX::value_type T; in gaussJordanInverse()
83 static constexpr unsigned int N = MATRIX::NUM_ROWS; in gaussJordanInverse()
84 MATRIX tmp(src); in gaussJordanInverse()
85 MATRIX inverted(1); in gaussJordanInverse()
129 template <typename MATRIX>
130 CONSTEXPR MATRIX PURE fastInverse2(const MATRIX& x) { in fastInverse2()
131 typedef typename MATRIX::value_type T; in fastInverse2()
143 MATRIX inverted(MATRIX::NO_INIT); in fastInverse2()
163 template <typename MATRIX>
164 CONSTEXPR MATRIX PURE fastInverse3(const MATRIX& x) { in fastInverse3()
165 typedef typename MATRIX::value_type T; in fastInverse3()
191 MATRIX inverted(MATRIX::NO_INIT); in fastInverse3()
233 template <typename MATRIX>
234 inline constexpr MATRIX PURE inverse(const MATRIX& matrix) { in inverse()
235 static_assert(MATRIX::NUM_ROWS == MATRIX::NUM_COLS, "only square matrices can be inverted"); in inverse()
236 return (MATRIX::NUM_ROWS == 2) ? fastInverse2<MATRIX>(matrix) : in inverse()
237 ((MATRIX::NUM_ROWS == 3) ? fastInverse3<MATRIX>(matrix) : in inverse()
238 gaussJordanInverse<MATRIX>(matrix)); in inverse()
263 template <typename MATRIX>
264 CONSTEXPR MATRIX PURE transpose(const MATRIX& m) { in transpose()
266 static_assert(MATRIX::NUM_COLS == MATRIX::NUM_ROWS, "transpose only supports square matrices"); in transpose()
267 MATRIX result(MATRIX::NO_INIT); in transpose()
268 for (size_t col = 0; col < MATRIX::NUM_COLS; ++col) { in transpose()
269 for (size_t row = 0; row < MATRIX::NUM_ROWS; ++row) { in transpose()
277 template <typename MATRIX>
278 CONSTEXPR typename MATRIX::value_type PURE trace(const MATRIX& m) { in trace()
279 static_assert(MATRIX::NUM_COLS == MATRIX::NUM_ROWS, "trace only defined for square matrices"); in trace()
280 typename MATRIX::value_type result(0); in trace()
281 for (size_t col = 0; col < MATRIX::NUM_COLS; ++col) { in trace()
288 template <typename MATRIX>
289 CONSTEXPR typename MATRIX::col_type PURE diag(const MATRIX& m) { in diag()
290 static_assert(MATRIX::NUM_COLS == MATRIX::NUM_ROWS, "diag only defined for square matrices"); in diag()
291 typename MATRIX::col_type result(MATRIX::col_type::NO_INIT); in diag()
292 for (size_t col = 0; col < MATRIX::NUM_COLS; ++col) { in diag()
300 template <typename MATRIX>
301 TQuaternion<typename MATRIX::value_type> extractQuat(const MATRIX& mat) { in extractQuat()
302 typedef typename MATRIX::value_type T; in extractQuat()
342 template <typename MATRIX>
343 String8 asString(const MATRIX& m) { in asString()
345 for (size_t c = 0; c < MATRIX::COL_SIZE; c++) { in asString()
347 for (size_t r = 0; r < MATRIX::ROW_SIZE; r++) { in asString()