Lines Matching full:matrix

23  * \brief Templatized matrix class.
33 // Templated matrix class.
35 class Matrix class
48 Matrix(void);
49 explicit Matrix(const T &src);
50 explicit Matrix(const T src[Rows * Cols]);
51 Matrix(const Vector<T, Rows> &src);
52 Matrix(const Matrix<T, Rows, Cols> &src);
53 ~Matrix(void);
55 Matrix<T, Rows, Cols> &operator=(const Matrix<T, Rows, Cols> &src);
56 Matrix<T, Rows, Cols> &operator*=(const Matrix<T, Rows, Cols> &src);
94 Matrix<T, Rows0, Cols1> operator*(const Matrix<T, Rows0, Cols0> &a, const Matrix<T, Rows1, Cols1> &…
98 Vector<T, Rows> operator*(const Matrix<T, Rows, Cols> &mtx, const Vector<T, Cols> &vec);
102 Vector<T, Cols> operator*(const Vector<T, Rows> &vec, const Matrix<T, Rows, Cols> &mtx);
105 bool operator==(const Matrix<T, Rows, Cols> &lhs, const Matrix<T, Rows, Cols> &rhs);
108 bool operator!=(const Matrix<T, Rows, Cols> &lhs, const Matrix<T, Rows, Cols> &rhs);
115 static T doDeterminant(const Matrix<T, Size, Size> &mat);
116 static Matrix<T, Size, Size> doInverse(const Matrix<T, Size, Size> &mat);
122 static T doDeterminant(const Matrix<T, 2, 2> &mat);
123 static Matrix<T, 2, 2> doInverse(const Matrix<T, 2, 2> &mat);
129 static T doDeterminant(const Matrix<T, 3, 3> &mat);
130 static Matrix<T, 3, 3> doInverse(const Matrix<T, 3, 3> &mat);
136 static T doDeterminant(const Matrix<T, 4, 4> &mat);
137 static Matrix<T, 4, 4> doInverse(const Matrix<T, 4, 4> &mat);
140 namespace matrix namespace
144 T determinant(const Matrix<T, Size, Size> &mat) in determinant()
150 Matrix<T, Size, Size> inverse(const Matrix<T, Size, Size> &mat) in inverse()
155 } // namespace matrix
160 T SquareMatrixOps<T, 2>::doDeterminant(const Matrix<T, 2, 2> &mat) in doDeterminant()
166 T SquareMatrixOps<T, 3>::doDeterminant(const Matrix<T, 3, 3> &mat) in doDeterminant()
173 T SquareMatrixOps<T, 4>::doDeterminant(const Matrix<T, 4, 4> &mat) in doDeterminant()
175 using matrix::determinant; in doDeterminant()
222 return +mat(0, 0) * determinant(Matrix<T, 3, 3>(minorMatrices[0])) - in doDeterminant()
223 mat(0, 1) * determinant(Matrix<T, 3, 3>(minorMatrices[1])) + in doDeterminant()
224 mat(0, 2) * determinant(Matrix<T, 3, 3>(minorMatrices[2])) - in doDeterminant()
225 mat(0, 3) * determinant(Matrix<T, 3, 3>(minorMatrices[3])); in doDeterminant()
229 Matrix<T, 2, 2> SquareMatrixOps<T, 2>::doInverse(const Matrix<T, 2, 2> &mat) in doInverse()
231 using matrix::determinant; in doInverse()
234 Matrix<T, 2, 2> retVal; in doInverse()
245 Matrix<T, 3, 3> SquareMatrixOps<T, 3>::doInverse(const Matrix<T, 3, 3> &mat) in doInverse()
248 using matrix::inverse; in doInverse()
262 const Matrix<T, 2, 2> invA = inverse(Matrix<T, 2, 2>(areaA)); in doInverse()
263 const Matrix<T, 2, 1> matB = Matrix<T, 2, 1>(areaB); in doInverse()
264 const Matrix<T, 1, 2> matC = Matrix<T, 1, 2>(areaC); in doInverse()
265 const Matrix<T, 1, 1> matD = Matrix<T, 1, 1>(areaD); in doInverse()
268 const Matrix<T, 2, 2> zeroMat = Matrix<T, 2, 2>(nullField); in doInverse()
270 const Matrix<T, 2, 2> blockA = invA + invA * matB * schurComplement * matC * invA; in doInverse()
271 const Matrix<T, 2, 1> blockB = (zeroMat - invA) * matB * schurComplement; in doInverse()
272 const Matrix<T, 1, 2> blockC = matC * invA * (-schurComplement); in doInverse()
280 return Matrix<T, 3, 3>(result); in doInverse()
284 Matrix<T, 4, 4> SquareMatrixOps<T, 4>::doInverse(const Matrix<T, 4, 4> &mat) in doInverse()
287 using matrix::inverse; in doInverse()
295 const Matrix<T, 2, 2> invA = inverse(Matrix<T, 2, 2>(areaA)); in doInverse()
296 const Matrix<T, 2, 2> matB = Matrix<T, 2, 2>(areaB); in doInverse()
297 const Matrix<T, 2, 2> matC = Matrix<T, 2, 2>(areaC); in doInverse()
298 const Matrix<T, 2, 2> matD = Matrix<T, 2, 2>(areaD); in doInverse()
300 const Matrix<T, 2, 2> schurComplement = inverse(matD - matC * invA * matB); in doInverse()
301 const Matrix<T, 2, 2> zeroMat = Matrix<T, 2, 2>(nullField); in doInverse()
303 const Matrix<T, 2, 2> blockA = invA + invA * matB * schurComplement * matC * invA; in doInverse()
304 const Matrix<T, 2, 2> blockB = (zeroMat - invA) * matB * schurComplement; in doInverse()
305 const Matrix<T, 2, 2> blockC = (zeroMat - schurComplement) * matC * invA; in doInverse()
306 const Matrix<T, 2, 2> blockD = schurComplement; in doInverse()
313 return Matrix<T, 4, 4>(result); in doInverse()
318 Matrix<T, Rows, Cols>::Matrix(void) in Matrix() function in tcu::Matrix
325 // Initialize to diagonal matrix.
327 Matrix<T, Rows, Cols>::Matrix(const T &src) in Matrix() function in tcu::Matrix
336 Matrix<T, Rows, Cols>::Matrix(const T src[Rows * Cols]) in Matrix() function in tcu::Matrix
343 // Initialize to diagonal matrix.
345 Matrix<T, Rows, Cols>::Matrix(const Vector<T, Rows> &src) in Matrix() function in tcu::Matrix
355 Matrix<T, Rows, Cols>::Matrix(const Matrix<T, Rows, Cols> &src) in Matrix() function in tcu::Matrix
362 Matrix<T, Rows, Cols>::~Matrix(void) in ~Matrix()
368 Matrix<T, Rows, Cols> &Matrix<T, Rows, Cols>::operator=(const Matrix<T, Rows, Cols> &src) in operator =()
378 Matrix<T, Rows, Cols> &Matrix<T, Rows, Cols>::operator*=(const Matrix<T, Rows, Cols> &src) in operator *=()
385 void Matrix<T, Rows, Cols>::setRow(int rowNdx, const Vector<T, Cols> &vec) in setRow()
392 void Matrix<T, Rows, Cols>::setColumn(int colNdx, const Vector<T, Rows> &vec) in setColumn()
398 Vector<T, Cols> Matrix<T, Rows, Cols>::getRow(int rowNdx) const in getRow()
407 Vector<T, Rows> &Matrix<T, Rows, Cols>::getColumn(int colNdx) in getColumn()
413 const Vector<T, Rows> &Matrix<T, Rows, Cols>::getColumn(int colNdx) const in getColumn()
419 Array<T, Rows * Cols> Matrix<T, Rows, Cols>::getColumnMajorData(void) const in getColumnMajorData()
430 Array<T, Rows * Cols> Matrix<T, Rows, Cols>::getRowMajorData(void) const in getRowMajorData()
442 Matrix<T, Rows0, Cols1> operator*(const Matrix<T, Rows0, Cols0> &a, const Matrix<T, Rows1, Cols1> &… in operator *()
445 Matrix<T, Rows0, Cols1> res; in operator *()
459 // Multiply of matrix with column vector.
461 Vector<T, Rows> operator*(const Matrix<T, Rows, Cols> &mtx, const Vector<T, Cols> &vec) in operator *()
474 // Multiply of matrix with row vector.
476 Vector<T, Cols> operator*(const Vector<T, Rows> &vec, const Matrix<T, Rows, Cols> &mtx) in operator *()
490 typedef Matrix<float, 2, 2> Matrix2f;
491 typedef Matrix<float, 3, 3> Matrix3f;
492 typedef Matrix<float, 4, 4> Matrix4f;
496 typedef Matrix<float, 3, 2> Mat2x3;
497 typedef Matrix<float, 4, 2> Mat2x4;
498 typedef Matrix<float, 2, 3> Mat3x2;
500 typedef Matrix<float, 4, 3> Mat3x4;
501 typedef Matrix<float, 2, 4> Mat4x2;
502 typedef Matrix<float, 3, 4> Mat4x3;
505 //using tcu::Matrix;
507 typedef Matrix<uint16_t, 2, 2> Matrix2f16b;
508 typedef Matrix<uint16_t, 3, 3> Matrix3f16b;
509 typedef Matrix<uint16_t, 4, 4> Matrix4f16b;
513 typedef Matrix<uint16_t, 3, 2> Mat2x3_16b;
514 typedef Matrix<uint16_t, 4, 2> Mat2x4_16b;
515 typedef Matrix<uint16_t, 2, 3> Mat3x2_16b;
517 typedef Matrix<uint16_t, 4, 3> Mat3x4_16b;
518 typedef Matrix<uint16_t, 2, 4> Mat4x2_16b;
519 typedef Matrix<uint16_t, 3, 4> Mat4x3_16b;
523 typedef Matrix<double, 2, 2> Matrix2d;
524 typedef Matrix<double, 3, 3> Matrix3d;
525 typedef Matrix<double, 4, 4> Matrix4d;
529 typedef Matrix<double, 3, 2> Mat2x3d;
530 typedef Matrix<double, 4, 2> Mat2x4d;
531 typedef Matrix<double, 2, 3> Mat3x2d;
533 typedef Matrix<double, 4, 3> Mat3x4d;
534 typedef Matrix<double, 2, 4> Mat4x2d;
535 typedef Matrix<double, 3, 4> Mat4x3d;
538 // Matrix-scalar operators.
541 Matrix<T, Rows, Cols> operator+(const Matrix<T, Rows, Cols> &mtx, T scalar) in operator +()
543 Matrix<T, Rows, Cols> res; in operator +()
551 Matrix<T, Rows, Cols> operator-(const Matrix<T, Rows, Cols> &mtx, T scalar) in operator -()
553 Matrix<T, Rows, Cols> res; in operator -()
561 Matrix<T, Rows, Cols> operator*(const Matrix<T, Rows, Cols> &mtx, T scalar) in operator *()
563 Matrix<T, Rows, Cols> res; in operator *()
571 Matrix<T, Rows, Cols> operator/(const Matrix<T, Rows, Cols> &mtx, T scalar) in operator /()
573 Matrix<T, Rows, Cols> res; in operator /()
580 // Matrix-matrix component-wise operators.
583 Matrix<T, Rows, Cols> operator+(const Matrix<T, Rows, Cols> &a, const Matrix<T, Rows, Cols> &b) in operator +()
585 Matrix<T, Rows, Cols> res; in operator +()
593 Matrix<T, Rows, Cols> operator-(const Matrix<T, Rows, Cols> &a, const Matrix<T, Rows, Cols> &b) in operator -()
595 Matrix<T, Rows, Cols> res; in operator -()
603 Matrix<T, Rows, Cols> operator/(const Matrix<T, Rows, Cols> &a, const Matrix<T, Rows, Cols> &b) in operator /()
605 Matrix<T, Rows, Cols> res; in operator /()
613 bool operator==(const Matrix<T, Rows, Cols> &lhs, const Matrix<T, Rows, Cols> &rhs) in operator ==()
623 bool operator!=(const Matrix<T, Rows, Cols> &lhs, const Matrix<T, Rows, Cols> &rhs) in operator !=()