mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix CwiseUnaryView.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
352ede96e4
commit
1d4369c2ff
@@ -118,7 +118,7 @@ EIGEN_DEVICE_FUNC inline const CwiseUnaryOp<CustomUnaryOp, const Derived> unaryE
|
||||
return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
|
||||
}
|
||||
|
||||
/// \returns an expression of a custom coefficient-wise unary operator \a func of *this
|
||||
/// \returns a const expression of a custom coefficient-wise unary operator \a func of *this
|
||||
///
|
||||
/// The template parameter \a CustomUnaryOp is the type of the functor
|
||||
/// of the custom unary operator.
|
||||
@@ -137,6 +137,21 @@ EIGEN_DEVICE_FUNC inline const CwiseUnaryView<CustomViewOp, const Derived> unary
|
||||
return CwiseUnaryView<CustomViewOp, const Derived>(derived(), func);
|
||||
}
|
||||
|
||||
/// \returns a non-const expression of a custom coefficient-wise unary view \a func of *this
|
||||
///
|
||||
/// The template parameter \a CustomUnaryOp is the type of the functor
|
||||
/// of the custom unary operator.
|
||||
///
|
||||
EIGEN_DOC_UNARY_ADDONS(unaryViewExpr, unary function)
|
||||
///
|
||||
/// \sa unaryExpr, binaryExpr class CwiseUnaryOp
|
||||
///
|
||||
template <typename CustomViewOp>
|
||||
EIGEN_DEVICE_FUNC inline CwiseUnaryView<CustomViewOp, Derived> unaryViewExpr(
|
||||
const CustomViewOp& func = CustomViewOp()) {
|
||||
return CwiseUnaryView<CustomViewOp, Derived>(derived(), func);
|
||||
}
|
||||
|
||||
/// \returns a non const expression of the real part of \c *this.
|
||||
///
|
||||
EIGEN_DOC_UNARY_ADDONS(real, real part function)
|
||||
|
||||
Reference in New Issue
Block a user