Home | History | Annotate | Download | only in LU

Lines Matching refs:MatrixType

21 template<typename MatrixType, typename ResultType, int Size = MatrixType::RowsAtCompileTime>
24 static inline void run(const MatrixType& matrix, ResultType& result)
30 template<typename MatrixType, typename ResultType, int Size = MatrixType::RowsAtCompileTime>
37 template<typename MatrixType, typename ResultType>
38 struct compute_inverse<MatrixType, ResultType, 1>
40 static inline void run(const MatrixType& matrix, ResultType& result)
42 typedef typename MatrixType::Scalar Scalar;
47 template<typename MatrixType, typename ResultType>
48 struct compute_inverse_and_det_with_check<MatrixType, ResultType, 1>
51 const MatrixType& matrix,
52 const typename MatrixType::RealScalar& absDeterminantThreshold,
68 template<typename MatrixType, typename ResultType>
70 const MatrixType& matrix, const typename ResultType::Scalar& invdet,
79 template<typename MatrixType, typename ResultType>
80 struct compute_inverse<MatrixType, ResultType, 2>
82 static inline void run(const MatrixType& matrix, ResultType& result)
85 const Scalar invdet = typename MatrixType::Scalar(1) / matrix.determinant();
90 template<typename MatrixType, typename ResultType>
91 struct compute_inverse_and_det_with_check<MatrixType, ResultType, 2>
94 const MatrixType& matrix,
95 const typename MatrixType::RealScalar& absDeterminantThreshold,
114 template<typename MatrixType, int i, int j>
115 inline typename MatrixType::Scalar cofactor_3x3(const MatrixType& m)
127 template<typename MatrixType, typename ResultType>
129 const MatrixType& matrix,
135 result.coeffRef(1,0) = cofactor_3x3<MatrixType,0,1>(matrix) * invdet;
136 result.coeffRef(1,1) = cofactor_3x3<MatrixType,1,1>(matrix) * invdet;
137 result.coeffRef(1,2) = cofactor_3x3<MatrixType,2,1>(matrix) * invdet;
138 result.coeffRef(2,0) = cofactor_3x3<MatrixType,0,2>(matrix) * invdet;
139 result.coeffRef(2,1) = cofactor_3x3<MatrixType,1,2>(matrix) * invdet;
140 result.coeffRef(2,2) = cofactor_3x3<MatrixType,2,2>(matrix) * invdet;
143 template<typename MatrixType, typename ResultType>
144 struct compute_inverse<MatrixType, ResultType, 3>
146 static inline void run(const MatrixType& matrix, ResultType& result)
149 Matrix<typename MatrixType::Scalar,3,1> cofactors_col0;
150 cofactors_col0.coeffRef(0) = cofactor_3x3<MatrixType,0,0>(matrix);
151 cofactors_col0.coeffRef(1) = cofactor_3x3<MatrixType,1,0>(matrix);
152 cofactors_col0.coeffRef(2) = cofactor_3x3<MatrixType,2,0>(matrix);
159 template<typename MatrixType, typename ResultType>
160 struct compute_inverse_and_det_with_check<MatrixType, ResultType, 3>
163 const MatrixType& matrix,
164 const typename MatrixType::RealScalar& absDeterminantThreshold,
172 cofactors_col0.coeffRef(0) = cofactor_3x3<MatrixType,0,0>(matrix);
173 cofactors_col0.coeffRef(1) = cofactor_3x3<MatrixType,1,0>(matrix);
174 cofactors_col0.coeffRef(2) = cofactor_3x3<MatrixType,2,0>(matrix);
195 template<typename MatrixType, int i, int j>
196 inline typename MatrixType::Scalar cofactor_4x4(const MatrixType& matrix)
211 template<int Arch, typename Scalar, typename MatrixType, typename ResultType>
214 static void run(const MatrixType& matrix, ResultType& result)
216 result.coeffRef(0,0) = cofactor_4x4<MatrixType,0,0>(matrix);
217 result.coeffRef(1,0) = -cofactor_4x4<MatrixType,0,1>(matrix);
218 result.coeffRef(2,0) = cofactor_4x4<MatrixType,0,2>(matrix);
219 result.coeffRef(3,0) = -cofactor_4x4<MatrixType,0,3>(matrix);
220 result.coeffRef(0,2) = cofactor_4x4<MatrixType,2,0>(matrix);
221 result.coeffRef(1,2) = -cofactor_4x4<MatrixType,2,1>(matrix);
222 result.coeffRef(2,2) = cofactor_4x4<MatrixType,2,2>(matrix);
223 result.coeffRef(3,2) = -cofactor_4x4<MatrixType,2,3>(matrix);
224 result.coeffRef(0,1) = -cofactor_4x4<MatrixType,1,0>(matrix);
225 result.coeffRef(1,1) = cofactor_4x4<MatrixType,1,1>(matrix);
226 result.coeffRef(2,1) = -cofactor_4x4<MatrixType,1,2>(matrix);
227 result.coeffRef(3,1) = cofactor_4x4<MatrixType,1,3>(matrix);
228 result.coeffRef(0,3) = -cofactor_4x4<MatrixType,3,0>(matrix);
229 result.coeffRef(1,3) = cofactor_4x4<MatrixType,3,1>(matrix);
230 result.coeffRef(2,3) = -cofactor_4x4<MatrixType,3,2>(matrix);
231 result.coeffRef(3,3) = cofactor_4x4<MatrixType,3,3>(matrix);
236 template<typename MatrixType, typename ResultType>
237 struct compute_inverse<MatrixType, ResultType, 4>
238 : compute_inverse_size4<Architecture::Target, typename MatrixType::Scalar,
239 MatrixType, ResultType>
243 template<typename MatrixType, typename ResultType>
244 struct compute_inverse_and_det_with_check<MatrixType, ResultType, 4>
247 const MatrixType& matrix,
248 const typename MatrixType::RealScalar& absDeterminantThreshold,
256 if(invertible) compute_inverse<MatrixType, ResultType>::run(matrix, inverse);
264 template<typename MatrixType>
265 struct traits<inverse_impl<MatrixType> >
267 typedef typename MatrixType::PlainObject ReturnType;
270 template<typename MatrixType>
271 struct inverse_impl : public ReturnByValue<inverse_impl<MatrixType> >
273 typedef typename MatrixType::Index Index;
274 typedef typename internal::eval<MatrixType>::type MatrixTypeNested;
278 inverse_impl(const MatrixType& matrix)
287 const int Size = EIGEN_PLAIN_ENUM_MIN(MatrixType::ColsAtCompileTime,Dest::ColsAtCompileTime);
358 >::type MatrixType;
359 internal::compute_inverse_and_det_with_check<MatrixType, ResultType>::run