API change: ei_matrix_exponential(A) --> A.exp(), etc

As discussed on mailing list; see
http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2010/02/msg00190.html
This commit is contained in:
Jitse Niesen
2010-03-16 17:26:55 +00:00
parent d536fef1bb
commit 04a4e22c58
11 changed files with 74 additions and 75 deletions

View File

@@ -372,6 +372,16 @@ template<typename Derived> class MatrixBase
template<typename OtherScalar>
void applyOnTheRight(int p, int q, const PlanarRotation<OtherScalar>& j);
///////// MatrixFunctions module /////////
typedef typename ei_stem_function<Scalar>::type StemFunction;
const MatrixExponentialReturnValue<Derived> exp() const;
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;
#ifdef EIGEN2_SUPPORT
template<typename ProductDerived, typename Lhs, typename Rhs>
Derived& operator+=(const Flagged<ProductBase<ProductDerived, Lhs,Rhs>, 0,

View File

@@ -167,6 +167,17 @@ template<typename Scalar,int Dim> class Translation;
template<typename Scalar> class UniformScaling;
template<typename MatrixType,int Direction> class Homogeneous;
// MatrixFunctions module
template<typename Derived> struct MatrixExponentialReturnValue;
template<typename Derived> struct MatrixFunctionReturnValue;
template <typename Scalar>
struct ei_stem_function
{
typedef std::complex<typename NumTraits<Scalar>::Real> ComplexScalar;
typedef ComplexScalar type(ComplexScalar, int);
};
#ifdef EIGEN2_SUPPORT
template<typename ExpressionType> class Cwise;
#endif