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);
82 Matrix<T, Rows0, Cols1> operator* (const Matrix<T, Rows0, Cols0>& a, const Matrix<T, Rows1, Cols1>&…
86 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec);
90 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx);
93 bool operator== (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs);
96 bool operator!= (const Matrix<T, Rows, Cols>& lhs, const Matrix<T, Rows, Cols>& rhs);
103 static T doDeterminant (const Matrix<T, Size, Size>& mat);
104 static Matrix<T, Size, Size> doInverse (const Matrix<T, Size, Size>& mat);
110 static T doDeterminant (const Matrix<T, 2, 2>& mat);
111 static Matrix<T, 2, 2> doInverse (const Matrix<T, 2, 2>& mat);
117 static T doDeterminant (const Matrix<T, 3, 3>& mat);
118 static Matrix<T, 3, 3> doInverse (const Matrix<T, 3, 3>& mat);
124 static T doDeterminant (const Matrix<T, 4, 4>& mat);
125 static Matrix<T, 4, 4> doInverse (const Matrix<T, 4, 4>& mat);
128 namespace matrix namespace
132 T determinant (const Matrix<T, Size, Size>& mat) in determinant()
138 Matrix<T, Size, Size> inverse (const Matrix<T, Size, Size>& mat) in inverse()
143 } // matrix
148 T SquareMatrixOps<T, 2>::doDeterminant (const Matrix<T, 2, 2>& mat) in doDeterminant()
154 T SquareMatrixOps<T, 3>::doDeterminant (const Matrix<T, 3, 3>& mat) in doDeterminant()
165 T SquareMatrixOps<T, 4>::doDeterminant (const Matrix<T, 4, 4>& mat) in doDeterminant()
167 using matrix::determinant; in doDeterminant()
193 return + mat(0,0) * determinant(Matrix<T, 3, 3>(minorMatrices[0])) in doDeterminant()
194 - mat(0,1) * determinant(Matrix<T, 3, 3>(minorMatrices[1])) in doDeterminant()
195 + mat(0,2) * determinant(Matrix<T, 3, 3>(minorMatrices[2])) in doDeterminant()
196 - mat(0,3) * determinant(Matrix<T, 3, 3>(minorMatrices[3])); in doDeterminant()
200 Matrix<T, 2, 2> SquareMatrixOps<T, 2>::doInverse (const Matrix<T, 2, 2>& mat) in doInverse()
202 using matrix::determinant; in doInverse()
205 Matrix<T, 2, 2> retVal; in doInverse()
216 Matrix<T, 3, 3> SquareMatrixOps<T, 3>::doInverse (const Matrix<T, 3, 3>& mat) in doInverse()
219 using matrix::inverse; in doInverse()
241 const Matrix<T, 2, 2> invA = inverse(Matrix<T, 2, 2>(areaA)); in doInverse()
242 const Matrix<T, 2, 1> matB = Matrix<T, 2, 1>(areaB); in doInverse()
243 const Matrix<T, 1, 2> matC = Matrix<T, 1, 2>(areaC); in doInverse()
244 const Matrix<T, 1, 1> matD = Matrix<T, 1, 1>(areaD); in doInverse()
247 const Matrix<T, 2, 2> zeroMat = Matrix<T, 2, 2>(nullField); in doInverse()
249 const Matrix<T, 2, 2> blockA = invA + invA*matB*schurComplement*matC*invA; in doInverse()
250 const Matrix<T, 2, 1> blockB = (zeroMat-invA)*matB*schurComplement; in doInverse()
251 const Matrix<T, 1, 2> blockC = matC*invA*(-schurComplement); in doInverse()
261 return Matrix<T, 3, 3>(result); in doInverse()
265 Matrix<T, 4, 4> SquareMatrixOps<T, 4>::doInverse (const Matrix<T, 4, 4>& mat) in doInverse()
268 using matrix::inverse; in doInverse()
292 const Matrix<T, 2, 2> invA = inverse(Matrix<T, 2, 2>(areaA)); in doInverse()
293 const Matrix<T, 2, 2> matB = Matrix<T, 2, 2>(areaB); in doInverse()
294 const Matrix<T, 2, 2> matC = Matrix<T, 2, 2>(areaC); in doInverse()
295 const Matrix<T, 2, 2> matD = Matrix<T, 2, 2>(areaD); in doInverse()
297 const Matrix<T, 2, 2> schurComplement = inverse(matD - matC*invA*matB); in doInverse()
298 const Matrix<T, 2, 2> zeroMat = Matrix<T, 2, 2>(nullField); in doInverse()
300 const Matrix<T, 2, 2> blockA = invA + invA*matB*schurComplement*matC*invA; in doInverse()
301 const Matrix<T, 2, 2> blockB = (zeroMat-invA)*matB*schurComplement; in doInverse()
302 const Matrix<T, 2, 2> blockC = (zeroMat-schurComplement)*matC*invA; in doInverse()
303 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<deUint16, 2, 2> Matrix2f16b;
508 typedef Matrix<deUint16, 3, 3> Matrix3f16b;
509 typedef Matrix<deUint16, 4, 4> Matrix4f16b;
513 typedef Matrix<deUint16, 3, 2> Mat2x3_16b;
514 typedef Matrix<deUint16, 4, 2> Mat2x4_16b;
515 typedef Matrix<deUint16, 2, 3> Mat3x2_16b;
517 typedef Matrix<deUint16, 4, 3> Mat3x4_16b;
518 typedef Matrix<deUint16, 2, 4> Mat4x2_16b;
519 typedef Matrix<deUint16, 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 !=()