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);
97 static T doDeterminant (const Matrix<T, Size, Size>& mat);
98 static Matrix<T, Size, Size> doInverse (const Matrix<T, Size, Size>& mat);
104 static T doDeterminant (const Matrix<T, 2, 2>& mat);
105 static Matrix<T, 2, 2> doInverse (const Matrix<T, 2, 2>& mat);
111 static T doDeterminant (const Matrix<T, 3, 3>& mat);
112 static Matrix<T, 3, 3> doInverse (const Matrix<T, 3, 3>& mat);
118 static T doDeterminant (const Matrix<T, 4, 4>& mat);
119 static Matrix<T, 4, 4> doInverse (const Matrix<T, 4, 4>& mat);
122 namespace matrix namespace
126 T determinant (const Matrix<T, Size, Size>& mat) in determinant()
132 Matrix<T, Size, Size> inverse (const Matrix<T, Size, Size>& mat) in inverse()
137 } // matrix
142 T SquareMatrixOps<T, 2>::doDeterminant (const Matrix<T, 2, 2>& mat) in doDeterminant()
148 T SquareMatrixOps<T, 3>::doDeterminant (const Matrix<T, 3, 3>& mat) in doDeterminant()
159 T SquareMatrixOps<T, 4>::doDeterminant (const Matrix<T, 4, 4>& mat) in doDeterminant()
161 using matrix::determinant; in doDeterminant()
187 return + mat(0,0) * determinant(Matrix<T, 3, 3>(minorMatrices[0])) in doDeterminant()
188 - mat(0,1) * determinant(Matrix<T, 3, 3>(minorMatrices[1])) in doDeterminant()
189 + mat(0,2) * determinant(Matrix<T, 3, 3>(minorMatrices[2])) in doDeterminant()
190 - mat(0,3) * determinant(Matrix<T, 3, 3>(minorMatrices[3])); in doDeterminant()
194 Matrix<T, 2, 2> SquareMatrixOps<T, 2>::doInverse (const Matrix<T, 2, 2>& mat) in doInverse()
196 using matrix::determinant; in doInverse()
199 Matrix<T, 2, 2> retVal; in doInverse()
210 Matrix<T, 3, 3> SquareMatrixOps<T, 3>::doInverse (const Matrix<T, 3, 3>& mat) in doInverse()
213 using matrix::inverse; in doInverse()
235 const Matrix<T, 2, 2> invA = inverse(Matrix<T, 2, 2>(areaA)); in doInverse()
236 const Matrix<T, 2, 1> matB = Matrix<T, 2, 1>(areaB); in doInverse()
237 const Matrix<T, 1, 2> matC = Matrix<T, 1, 2>(areaC); in doInverse()
238 const Matrix<T, 1, 1> matD = Matrix<T, 1, 1>(areaD); in doInverse()
241 const Matrix<T, 2, 2> zeroMat = Matrix<T, 2, 2>(nullField); in doInverse()
243 const Matrix<T, 2, 2> blockA = invA + invA*matB*schurComplement*matC*invA; in doInverse()
244 const Matrix<T, 2, 1> blockB = (zeroMat-invA)*matB*schurComplement; in doInverse()
245 const Matrix<T, 1, 2> blockC = matC*invA*(-schurComplement); in doInverse()
255 return Matrix<T, 3, 3>(result); in doInverse()
259 Matrix<T, 4, 4> SquareMatrixOps<T, 4>::doInverse (const Matrix<T, 4, 4>& mat) in doInverse()
262 using matrix::inverse; in doInverse()
286 const Matrix<T, 2, 2> invA = inverse(Matrix<T, 2, 2>(areaA)); in doInverse()
287 const Matrix<T, 2, 2> matB = Matrix<T, 2, 2>(areaB); in doInverse()
288 const Matrix<T, 2, 2> matC = Matrix<T, 2, 2>(areaC); in doInverse()
289 const Matrix<T, 2, 2> matD = Matrix<T, 2, 2>(areaD); in doInverse()
291 const Matrix<T, 2, 2> schurComplement = inverse(matD - matC*invA*matB); in doInverse()
292 const Matrix<T, 2, 2> zeroMat = Matrix<T, 2, 2>(nullField); in doInverse()
294 const Matrix<T, 2, 2> blockA = invA + invA*matB*schurComplement*matC*invA; in doInverse()
295 const Matrix<T, 2, 2> blockB = (zeroMat-invA)*matB*schurComplement; in doInverse()
296 const Matrix<T, 2, 2> blockC = (zeroMat-schurComplement)*matC*invA; in doInverse()
297 const Matrix<T, 2, 2> blockD = schurComplement; in doInverse()
307 return Matrix<T, 4, 4>(result); in doInverse()
312 Matrix<T, Rows, Cols>::Matrix (void) in Matrix() function in tcu::Matrix
319 // Initialize to diagonal matrix.
321 Matrix<T, Rows, Cols>::Matrix (const T& src) in Matrix() function in tcu::Matrix
330 Matrix<T, Rows, Cols>::Matrix (const T src[Rows*Cols]) in Matrix() function in tcu::Matrix
337 // Initialize to diagonal matrix.
339 Matrix<T, Rows, Cols>::Matrix (const Vector<T, Rows>& src) in Matrix() function in tcu::Matrix
349 Matrix<T, Rows, Cols>::Matrix (const Matrix<T, Rows, Cols>& src) in Matrix() function in tcu::Matrix
356 Matrix<T, Rows, Cols>::~Matrix (void) in ~Matrix()
362 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator= (const Matrix<T, Rows, Cols>& src) in operator =()
372 Matrix<T, Rows, Cols>& Matrix<T, Rows, Cols>::operator*= (const Matrix<T, Rows, Cols>& src) in operator *=()
379 void Matrix<T, Rows, Cols>::setRow (int rowNdx, const Vector<T, Cols>& vec) in setRow()
386 void Matrix<T, Rows, Cols>::setColumn (int colNdx, const Vector<T, Rows>& vec) in setColumn()
392 Vector<T, Cols> Matrix<T, Rows, Cols>::getRow (int rowNdx) const in getRow()
401 Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) in getColumn()
407 const Vector<T, Rows>& Matrix<T, Rows, Cols>::getColumn (int colNdx) const in getColumn()
413 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getColumnMajorData (void) const in getColumnMajorData()
424 Array<T, Rows*Cols> Matrix<T, Rows, Cols>::getRowMajorData (void) const in getRowMajorData()
436 Matrix<T, Rows0, Cols1> operator* (const Matrix<T, Rows0, Cols0>& a, const Matrix<T, Rows1, Cols1>&… in operator *()
439 Matrix<T, Rows0, Cols1> res; in operator *()
453 // Multiply of matrix with column vector.
455 Vector<T, Rows> operator* (const Matrix<T, Rows, Cols>& mtx, const Vector<T, Cols>& vec) in operator *()
468 // Multiply of matrix with row vector.
470 Vector<T, Cols> operator* (const Vector<T, Rows>& vec, const Matrix<T, Rows, Cols>& mtx) in operator *()
484 typedef Matrix<float, 2, 2> Matrix2f;
485 typedef Matrix<float, 3, 3> Matrix3f;
486 typedef Matrix<float, 4, 4> Matrix4f;
487 typedef Matrix<double, 2, 2> Matrix2d;
488 typedef Matrix<double, 3, 3> Matrix3d;
489 typedef Matrix<double, 4, 4> Matrix4d;
493 typedef Matrix<float, 3, 2> Mat2x3;
494 typedef Matrix<float, 4, 2> Mat2x4;
495 typedef Matrix<float, 2, 3> Mat3x2;
497 typedef Matrix<float, 4, 3> Mat3x4;
498 typedef Matrix<float, 2, 4> Mat4x2;
499 typedef Matrix<float, 3, 4> Mat4x3;
502 // Matrix-scalar operators.
505 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator +()
507 Matrix<T, Rows, Cols> res; in operator +()
515 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator -()
517 Matrix<T, Rows, Cols> res; in operator -()
525 Matrix<T, Rows, Cols> operator* (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator *()
527 Matrix<T, Rows, Cols> res; in operator *()
535 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& mtx, T scalar) in operator /()
537 Matrix<T, Rows, Cols> res; in operator /()
544 // Matrix-matrix component-wise operators.
547 Matrix<T, Rows, Cols> operator+ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b) in operator +()
549 Matrix<T, Rows, Cols> res; in operator +()
557 Matrix<T, Rows, Cols> operator- (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b) in operator -()
559 Matrix<T, Rows, Cols> res; in operator -()
567 Matrix<T, Rows, Cols> operator/ (const Matrix<T, Rows, Cols>& a, const Matrix<T, Rows, Cols>& b) in operator /()
569 Matrix<T, Rows, Cols> res; in operator /()