diff options
Diffstat (limited to 'eigen/Eigen/src/Core/MatrixBase.h')
-rw-r--r-- | eigen/Eigen/src/Core/MatrixBase.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/eigen/Eigen/src/Core/MatrixBase.h b/eigen/Eigen/src/Core/MatrixBase.h index 05db488..e6c3590 100644 --- a/eigen/Eigen/src/Core/MatrixBase.h +++ b/eigen/Eigen/src/Core/MatrixBase.h @@ -444,16 +444,24 @@ template<typename Derived> class MatrixBase ///////// MatrixFunctions module ///////// typedef typename internal::stem_function<Scalar>::type StemFunction; - const MatrixExponentialReturnValue<Derived> exp() const; +#define EIGEN_MATRIX_FUNCTION(ReturnType, Name, Description) \ + /** \returns an expression of the matrix Description of \c *this. \brief This function requires the <a href="unsupported/group__MatrixFunctions__Module.html"> unsupported MatrixFunctions module</a>. To compute the coefficient-wise Description use ArrayBase::##Name . */ \ + const ReturnType<Derived> Name() const; +#define EIGEN_MATRIX_FUNCTION_1(ReturnType, Name, Description, Argument) \ + /** \returns an expression of the matrix Description of \c *this. \brief This function requires the <a href="unsupported/group__MatrixFunctions__Module.html"> unsupported MatrixFunctions module</a>. To compute the coefficient-wise Description use ArrayBase::##Name . */ \ + const ReturnType<Derived> Name(Argument) const; + + EIGEN_MATRIX_FUNCTION(MatrixExponentialReturnValue, exp, exponential) + /** \brief Helper function for the <a href="unsupported/group__MatrixFunctions__Module.html"> unsupported MatrixFunctions module</a>.*/ const MatrixFunctionReturnValue<Derived> matrixFunction(StemFunction f) const; - const MatrixFunctionReturnValue<Derived> cosh() const; - const MatrixFunctionReturnValue<Derived> sinh() const; - const MatrixFunctionReturnValue<Derived> cos() const; - const MatrixFunctionReturnValue<Derived> sin() const; - const MatrixSquareRootReturnValue<Derived> sqrt() const; - const MatrixLogarithmReturnValue<Derived> log() const; - const MatrixPowerReturnValue<Derived> pow(const RealScalar& p) const; - const MatrixComplexPowerReturnValue<Derived> pow(const std::complex<RealScalar>& p) const; + EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, cosh, hyperbolic cosine) + EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, sinh, hyperbolic sine) + EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, cos, cosine) + EIGEN_MATRIX_FUNCTION(MatrixFunctionReturnValue, sin, sine) + EIGEN_MATRIX_FUNCTION(MatrixSquareRootReturnValue, sqrt, square root) + EIGEN_MATRIX_FUNCTION(MatrixLogarithmReturnValue, log, logarithm) + EIGEN_MATRIX_FUNCTION_1(MatrixPowerReturnValue, pow, power to \c p, const RealScalar& p) + EIGEN_MATRIX_FUNCTION_1(MatrixComplexPowerReturnValue, pow, power to \c p, const std::complex<RealScalar>& p) protected: EIGEN_DEVICE_FUNC MatrixBase() : Base() {} |