diff options
author | 2009-12-16 19:18:40 +0100 | |
---|---|---|
committer | 2009-12-16 19:18:40 +0100 | |
commit | 9f7955883918f09648618f89f1551b0b6667343d (patch) | |
tree | c56b94c1453c3578eb5939c3939099bf41a9cff0 /Eigen/src/plugins/ArrayCwiseUnaryOps.h | |
parent | 22a6ab1f4b473a97b1d9bf27eb91788f35d9ac40 (diff) |
a lot of cleaning and fixes
Diffstat (limited to 'Eigen/src/plugins/ArrayCwiseUnaryOps.h')
-rw-r--r-- | Eigen/src/plugins/ArrayCwiseUnaryOps.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Eigen/src/plugins/ArrayCwiseUnaryOps.h b/Eigen/src/plugins/ArrayCwiseUnaryOps.h index 63bd43871..ce69a04b5 100644 --- a/Eigen/src/plugins/ArrayCwiseUnaryOps.h +++ b/Eigen/src/plugins/ArrayCwiseUnaryOps.h @@ -146,3 +146,17 @@ cube() const { return derived(); } + +#define EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(METHOD_NAME,FUNCTOR) \ + inline const CwiseUnaryOp<std::binder1st<FUNCTOR<Scalar> >,Derived> \ + METHOD_NAME(Scalar s) const { \ + return CwiseUnaryOp<std::binder1st<FUNCTOR<Scalar> >,Derived> \ + (derived(), std::bind1st(FUNCTOR<Scalar>(), s)); \ + } + +EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator==, std::equal_to); +EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator!=, std::not_equal_to); +EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator<, std::less); +EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator<=, std::less_equal); +EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator>, std::greater); +EIGEN_MAKE_SCALAR_CWISE_UNARY_OP(operator>=, std::greater_equal); |