diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-11-20 18:20:55 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-11-20 18:20:55 +0100 |
commit | 80ebeae48d7b56500d9ebc8abd2789061af145e1 (patch) | |
tree | d6ff3642865c3a5778370edc65aa719790be7c01 /Eigen/src/Core/CwiseUnaryOp.h | |
parent | 4af1753b6fa83e2c0013f38e6d9e8538896d9d3c (diff) |
Add the concept of base class plugins, and started to write the ArrayBase class.
Sorry for this messy commit but I have to commit it...
Diffstat (limited to 'Eigen/src/Core/CwiseUnaryOp.h')
-rw-r--r-- | Eigen/src/Core/CwiseUnaryOp.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Eigen/src/Core/CwiseUnaryOp.h b/Eigen/src/Core/CwiseUnaryOp.h index 55f965b4e..abece413b 100644 --- a/Eigen/src/Core/CwiseUnaryOp.h +++ b/Eigen/src/Core/CwiseUnaryOp.h @@ -92,9 +92,12 @@ class CwiseUnaryOp : ei_no_assignment_operator, const UnaryOp m_functor; }; +// This is the generic implementation for dense storage. +// It can be used for any matrix types implementing the dense concept. template<typename UnaryOp, typename MatrixType> -class CwiseUnaryOpImpl<UnaryOp,MatrixType,Dense> : public MatrixBase<CwiseUnaryOp<UnaryOp, MatrixType> > -{ +class CwiseUnaryOpImpl<UnaryOp,MatrixType,Dense> + : public MatrixType::template MakeBase< CwiseUnaryOp<UnaryOp, MatrixType> >::Type + { const typename ei_cleantype<typename MatrixType::Nested>::type& matrix() const { return derived().nestedExpression(); } typename ei_cleantype<typename MatrixType::Nested>::type& matrix() |