Lines Matching full:matrix

26   static inline void run(const MatrixType& matrix, ResultType& result)  in run()
28 result = matrix.partialPivLu().inverse(); in run()
43 static inline void run(const MatrixType& matrix, ResultType& result)
46 internal::evaluator<MatrixType> matrixEval(matrix);
56 const MatrixType& matrix,
64 determinant = matrix.coeff(0,0);
77 const MatrixType& matrix, const typename ResultType::Scalar& invdet,
80 result.coeffRef(0,0) = matrix.coeff(1,1) * invdet;
81 result.coeffRef(1,0) = -matrix.coeff(1,0) * invdet;
82 result.coeffRef(0,1) = -matrix.coeff(0,1) * invdet;
83 result.coeffRef(1,1) = matrix.coeff(0,0) * invdet;
90 static inline void run(const MatrixType& matrix, ResultType& result)
93 const Scalar invdet = typename MatrixType::Scalar(1) / matrix.determinant();
94 compute_inverse_size2_helper(matrix, invdet, result);
103 const MatrixType& matrix,
112 determinant = matrix.determinant();
116 compute_inverse_size2_helper(matrix, invdet, inverse);
141 const MatrixType& matrix,
143 const Matrix<typename ResultType::Scalar,3,1>& cofactors_col0,
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;
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);
166 const Scalar det = (cofactors_col0.cwiseProduct(matrix.col(0))).sum();
168 compute_inverse_size3_helper(matrix, invdet, cofactors_col0, result);
177 const MatrixType& matrix,
186 Matrix<Scalar,3,1> cofactors_col0;
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);
190 determinant = (cofactors_col0.cwiseProduct(matrix.col(0))).sum();
194 compute_inverse_size3_helper(matrix, invdet, cofactors_col0, inverse);
205 (const MatrixBase<Derived>& matrix, int i1, int i2, int i3, int j1, int j2, int j3)
207 return matrix.coeff(i1,j1)
208 * (matrix.coeff(i2,j2) * matrix.coeff(i3,j3) - matrix.coeff(i2,j3) * matrix.coeff(i3,j2));
213 inline typename MatrixType::Scalar cofactor_4x4(const MatrixType& matrix)
223 return general_det3_helper(matrix, i1, i2, i3, j1, j2, j3)
224 + general_det3_helper(matrix, i2, i3, i1, j1, j2, j3)
225 + general_det3_helper(matrix, i3, i1, i2, j1, j2, j3);
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);
250 result /= (matrix.col(0).cwiseProduct(result.row(0).transpose())).sum();
266 const MatrixType& matrix,
274 determinant = matrix.determinant();
276 if(invertible) compute_inverse<MatrixType, ResultType>::run(matrix, inverse);
319 * \returns the matrix inverse of this matrix.
324 * \note This matrix must be invertible, otherwise the result is undefined. If you need an
344 * Computation of matrix inverse and determinant, with invertibility check.
348 * \param inverse Reference to the matrix in which to store the inverse.
350 …* \param invertible Reference to the bool variable in which to store whether the matrix is inverti…
352 …* The matrix will be declared invertible if the absolute value of i…
384 * Computation of matrix inverse, with invertibility check.
388 * \param inverse Reference to the matrix in which to store the inverse.
389 …* \param invertible Reference to the bool variable in which to store whether the matrix is inverti…
391 …* The matrix will be declared invertible if the absolute value of i…