Lines Matching defs:MatrixType

22 template<typename MatrixType, typename ResultType, int Size = MatrixType::RowsAtCompileTime>
26 static inline void run(const MatrixType& matrix, ResultType& result)
32 template<typename MatrixType, typename ResultType, int Size = MatrixType::RowsAtCompileTime>
39 template<typename MatrixType, typename ResultType>
40 struct compute_inverse<MatrixType, ResultType, 1>
43 static inline void run(const MatrixType& matrix, ResultType& result)
45 typedef typename MatrixType::Scalar Scalar;
46 internal::evaluator<MatrixType> matrixEval(matrix);
51 template<typename MatrixType, typename ResultType>
52 struct compute_inverse_and_det_with_check<MatrixType, ResultType, 1>
56 const MatrixType& matrix,
57 const typename MatrixType::RealScalar& absDeterminantThreshold,
74 template<typename MatrixType, typename ResultType>
77 const MatrixType& matrix, const typename ResultType::Scalar& invdet,
86 template<typename MatrixType, typename ResultType>
87 struct compute_inverse<MatrixType, ResultType, 2>
90 static inline void run(const MatrixType& matrix, ResultType& result)
93 const Scalar invdet = typename MatrixType::Scalar(1) / matrix.determinant();
98 template<typename MatrixType, typename ResultType>
99 struct compute_inverse_and_det_with_check<MatrixType, ResultType, 2>
103 const MatrixType& matrix,
104 const typename MatrixType::RealScalar& absDeterminantThreshold,
124 template<typename MatrixType, int i, int j>
126 inline typename MatrixType::Scalar cofactor_3x3(const MatrixType& m)
138 template<typename MatrixType, typename ResultType>
141 const MatrixType& matrix,
147 result.coeffRef(1,0) = cofactor_3x3<MatrixType,0,1>(matrix) * invdet;
148 result.coeffRef(1,1) = cofactor_3x3<MatrixType,1,1>(matrix) * invdet;
149 result.coeffRef(1,2) = cofactor_3x3<MatrixType,2,1>(matrix) * invdet;
150 result.coeffRef(2,0) = cofactor_3x3<MatrixType,0,2>(matrix) * invdet;
151 result.coeffRef(2,1) = cofactor_3x3<MatrixType,1,2>(matrix) * invdet;
152 result.coeffRef(2,2) = cofactor_3x3<MatrixType,2,2>(matrix) * invdet;
155 template<typename MatrixType, typename ResultType>
156 struct compute_inverse<MatrixType, ResultType, 3>
159 static inline void run(const MatrixType& matrix, ResultType& result)
162 Matrix<typename MatrixType::Scalar,3,1> cofactors_col0;
163 cofactors_col0.coeffRef(0) = cofactor_3x3<MatrixType,0,0>(matrix);
164 cofactors_col0.coeffRef(1) = cofactor_3x3<MatrixType,1,0>(matrix);
165 cofactors_col0.coeffRef(2) = cofactor_3x3<MatrixType,2,0>(matrix);
172 template<typename MatrixType, typename ResultType>
173 struct compute_inverse_and_det_with_check<MatrixType, ResultType, 3>
177 const MatrixType& matrix,
178 const typename MatrixType::RealScalar& absDeterminantThreshold,
187 cofactors_col0.coeffRef(0) = cofactor_3x3<MatrixType,0,0>(matrix);
188 cofactors_col0.coeffRef(1) = cofactor_3x3<MatrixType,1,0>(matrix);
189 cofactors_col0.coeffRef(2) = cofactor_3x3<MatrixType,2,0>(matrix);
211 template<typename MatrixType, int i, int j>
213 inline typename MatrixType::Scalar cofactor_4x4(const MatrixType& matrix)
228 template<int Arch, typename Scalar, typename MatrixType, typename ResultType>
232 static void run(const MatrixType& matrix, ResultType& result)
234 result.coeffRef(0,0) = cofactor_4x4<MatrixType,0,0>(matrix);
235 result.coeffRef(1,0) = -cofactor_4x4<MatrixType,0,1>(matrix);
236 result.coeffRef(2,0) = cofactor_4x4<MatrixType,0,2>(matrix);
237 result.coeffRef(3,0) = -cofactor_4x4<MatrixType,0,3>(matrix);
238 result.coeffRef(0,2) = cofactor_4x4<MatrixType,2,0>(matrix);
239 result.coeffRef(1,2) = -cofactor_4x4<MatrixType,2,1>(matrix);
240 result.coeffRef(2,2) = cofactor_4x4<MatrixType,2,2>(matrix);
241 result.coeffRef(3,2) = -cofactor_4x4<MatrixType,2,3>(matrix);
242 result.coeffRef(0,1) = -cofactor_4x4<MatrixType,1,0>(matrix);
243 result.coeffRef(1,1) = cofactor_4x4<MatrixType,1,1>(matrix);
244 result.coeffRef(2,1) = -cofactor_4x4<MatrixType,1,2>(matrix);
245 result.coeffRef(3,1) = cofactor_4x4<MatrixType,1,3>(matrix);
246 result.coeffRef(0,3) = -cofactor_4x4<MatrixType,3,0>(matrix);
247 result.coeffRef(1,3) = cofactor_4x4<MatrixType,3,1>(matrix);
248 result.coeffRef(2,3) = -cofactor_4x4<MatrixType,3,2>(matrix);
249 result.coeffRef(3,3) = cofactor_4x4<MatrixType,3,3>(matrix);
254 template<typename MatrixType, typename ResultType>
255 struct compute_inverse<MatrixType, ResultType, 4>
256 : compute_inverse_size4<Architecture::Target, typename MatrixType::Scalar,
257 MatrixType, ResultType>
261 template<typename MatrixType, typename ResultType>
262 struct compute_inverse_and_det_with_check<MatrixType, ResultType, 4>
266 const MatrixType& matrix,
267 const typename MatrixType::RealScalar& absDeterminantThreshold,
276 if(invertible) compute_inverse<MatrixType, ResultType>::run(matrix, inverse);
377 >::type MatrixType;
378 internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run