aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-06-19 23:17:07 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-06-19 23:17:07 +0200
commit575ac5409c6f6a9af219cdff3374c40e8a2a120d (patch)
treed44914356e01c3cebdc2f9dffb5034b30ae7f1c2 /Eigen
parenteba418a458dd53a9a2c2af33f307e25ecc9413fa (diff)
add missing support for std::pow(array,scalar)
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Array/GlobalFunctions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Eigen/src/Array/GlobalFunctions.h b/Eigen/src/Array/GlobalFunctions.h
index 5de87e604..14825656b 100644
--- a/Eigen/src/Array/GlobalFunctions.h
+++ b/Eigen/src/Array/GlobalFunctions.h
@@ -60,6 +60,12 @@ namespace std
EIGEN_ARRAY_DECLARE_GLOBAL_STD_UNARY(log,ei_scalar_log_op)
EIGEN_ARRAY_DECLARE_GLOBAL_STD_UNARY(abs,ei_scalar_abs_op)
EIGEN_ARRAY_DECLARE_GLOBAL_STD_UNARY(sqrt,ei_scalar_sqrt_op)
+
+ template<typename Derived>
+ inline const Eigen::CwiseUnaryOp<Eigen::ei_scalar_pow_op<typename Derived::Scalar>, Derived>
+ pow(const Eigen::ArrayBase<Derived>& x, const typename Derived::Scalar& exponent) { \
+ return x.derived().pow(exponent); \
+ }
}
namespace Eigen