Go to the source code of this file.
Classes | |
struct | CastXpr< NewType > |
Typedefs | |
typedef internal::conditional< NumTraits< Scalar >::IsComplex, const CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, const Derived >, const Derived & >::type | ConjugateReturnType |
typedef CwiseUnaryOp< internal::scalar_imag_op< Scalar >, const Derived > | ImagReturnType |
typedef CwiseUnaryOp< internal::scalar_opposite_op< Scalar >, const Derived > | NegativeReturnType |
typedef CwiseUnaryView< internal::scalar_imag_ref_op< Scalar >, Derived > | NonConstImagReturnType |
typedef internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryView< internal::scalar_real_ref_op< Scalar >, Derived >, Derived & >::type | NonConstRealReturnType |
typedef internal::conditional< NumTraits< Scalar >::IsComplex, const CwiseUnaryOp< internal::scalar_real_op< Scalar >, const Derived >, const Derived & >::type | RealReturnType |
Functions | |
template<typename NewType > | |
EIGEN_DEVICE_FUNC CastXpr< NewType >::Type | cast () const |
EIGEN_DEVICE_FUNC ConjugateReturnType | conjugate () const |
template<bool Cond> | |
EIGEN_DEVICE_FUNC internal::conditional< Cond, ConjugateReturnType, const Derived & >::type | conjugateIf () const |
const EIGEN_DEVICE_FUNC ImagReturnType | imag () const |
const EIGEN_DEVICE_FUNC NegativeReturnType | operator- () const |
EIGEN_DEVICE_FUNC RealReturnType | real () const |
template<typename CustomUnaryOp > | |
const EIGEN_DEVICE_FUNC CwiseUnaryOp< CustomUnaryOp, const Derived > | unaryExpr (const CustomUnaryOp &func=CustomUnaryOp()) const |
Apply a unary operator coefficient-wise. More... | |
template<typename CustomViewOp > | |
const EIGEN_DEVICE_FUNC CwiseUnaryView< CustomViewOp, const Derived > | unaryViewExpr (const CustomViewOp &func=CustomViewOp()) const |
typedef internal::conditional<NumTraits<Scalar>::IsComplex, const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, const Derived>, const Derived& >::type ConjugateReturnType |
Definition at line 19 of file CommonCwiseUnaryOps.h.
typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, const Derived> ImagReturnType |
Definition at line 31 of file CommonCwiseUnaryOps.h.
typedef CwiseUnaryOp<internal::scalar_opposite_op<Scalar>, const Derived> NegativeReturnType |
Definition at line 35 of file CommonCwiseUnaryOps.h.
typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType |
Definition at line 33 of file CommonCwiseUnaryOps.h.
typedef internal::conditional<NumTraits<Scalar>::IsComplex, CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>, Derived& >::type NonConstRealReturnType |
Definition at line 29 of file CommonCwiseUnaryOps.h.
typedef internal::conditional<NumTraits<Scalar>::IsComplex, const CwiseUnaryOp<internal::scalar_real_op<Scalar>, const Derived>, const Derived& >::type RealReturnType |
Definition at line 24 of file CommonCwiseUnaryOps.h.
EIGEN_DEVICE_FUNC CastXpr<NewType>::Type cast | ( | ) | const |
*this
with the Scalar type casted to NewScalar.The template parameter NewScalar is the type we are casting the scalars to.
Definition at line 62 of file CommonCwiseUnaryOps.h.
|
inline |
*this
.Definition at line 74 of file CommonCwiseUnaryOps.h.
|
inline |
*this
if Cond==true, returns derived() otherwise.Definition at line 87 of file CommonCwiseUnaryOps.h.
|
inline |
*this
.*this
.Definition at line 109 of file CommonCwiseUnaryOps.h.
|
inline |
*this
Definition at line 45 of file CommonCwiseUnaryOps.h.
|
inline |
*this
.*this
.Definition at line 100 of file CommonCwiseUnaryOps.h.
|
inline |
Apply a unary operator coefficient-wise.
[in] | func | Functor implementing the unary operator |
CustomUnaryOp | Type of func |
The function ptr_fun()
from the C++ standard library can be used to make functors out of normal functions.
Example:
Output:
Genuine functors allow for more possibilities, for instance it may contain a state.
Example:
Output:
Definition at line 135 of file CommonCwiseUnaryOps.h.
|
inline |
The template parameter CustomUnaryOp is the type of the functor of the custom unary operator.
Example:
Output:
Definition at line 156 of file CommonCwiseUnaryOps.h.