* \brief Computes the inverse of the input matrix. * \return The inverse matrix */
| 23 | * \return The inverse matrix |
| 24 | */ |
| 25 | InverseResultType inverse() const |
| 26 | { |
| 27 | CUMAT_STATIC_ASSERT(CUMAT_IMPLIES(Rows > 0 && Columns > 0, Rows == Columns), |
| 28 | "Static count of rows and columns must be equal (square matrix)"); |
| 29 | CUMAT_ASSERT(impl().rows() == impl().cols()); |
| 30 | |
| 31 | return impl().solve(NullaryOp<Scalar, Rows, Columns, Batches, ColumnMajor, functor::IdentityFunctor<Scalar> >( |
| 32 | impl().rows(), impl().cols(), impl().batches(), functor::IdentityFunctor<Scalar>())); |
| 33 | } |
| 34 | |
| 35 | typedef Matrix<Scalar, 1, 1, Batches, ColumnMajor> DeterminantMatrix; |
| 36 |