diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h b/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h index 5ba6278ae..ffb344065 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h @@ -513,7 +513,7 @@ class MatrixPowerReturnValue : public ReturnByValue< MatrixPowerReturnValue class MatrixComplexPowerReturnValue : public ReturnByValue< MatrixComplexPowerReturnValue > { @@ -544,9 +557,24 @@ class MatrixComplexPowerReturnValue : public ReturnByValue< MatrixComplexPowerRe typedef typename std::complex ComplexScalar; typedef typename Derived::Index Index; + /** + * \brief Constructor. + * + * \param[in] A %Matrix (expression), the base of the matrix power. + * \param[in] p complex scalar, the exponent of the matrix power. + */ MatrixComplexPowerReturnValue(const Derived& A, const ComplexScalar& p) : m_A(A), m_p(p) { } + /** + * \brief Compute the matrix power. + * + * Because \p p is complex, \f$ A^p \f$ is simply evaluated as \f$ + * \exp(p \log(A)) \f$. + * + * \param[out] result \f$ A^p \f$ where \p A and \p p are as in the + * constructor. + */ template inline void evalTo(ResultType& res) const { res = (m_p * m_A.log()).exp(); }