Go to the source code of this file.
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 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 |
typedef CwiseUnaryOp < internal::scalar_multiple_op < Scalar >, const Derived > | ScalarMultipleReturnType |
typedef CwiseUnaryOp < internal::scalar_quotient1_op < Scalar >, const Derived > | ScalarQuotient1ReturnType |
Functions | |
template<typename NewType > | |
internal::cast_return_type < Derived, const CwiseUnaryOp < internal::scalar_cast_op < typename internal::traits < Derived >::Scalar, NewType > , const Derived > >::type | cast () const |
ConjugateReturnType | conjugate () const |
const ImagReturnType | imag () const |
const ScalarMultipleReturnType | operator* (const Scalar &scalar) const |
const CwiseUnaryOp < internal::scalar_multiple2_op < Scalar, std::complex< Scalar > >, const Derived > | operator* (const std::complex< Scalar > &scalar) const |
const ScalarMultipleReturnType | operator* (const Scalar &scalar, const StorageBaseType &matrix) |
const CwiseUnaryOp < internal::scalar_multiple2_op < Scalar, std::complex< Scalar > >, const Derived > | operator* (const std::complex< Scalar > &scalar, const StorageBaseType &matrix) |
const CwiseUnaryOp < internal::scalar_opposite_op < typename internal::traits < Derived >::Scalar >, const Derived > | operator- () const |
const CwiseUnaryOp < internal::scalar_quotient1_op < typename internal::traits < Derived >::Scalar >, const Derived > | operator/ (const Scalar &scalar) const |
RealReturnType | real () const |
template<typename CustomUnaryOp > | |
const CwiseUnaryOp < CustomUnaryOp, const Derived > | unaryExpr (const CustomUnaryOp &func=CustomUnaryOp()) const |
Apply a unary operator coefficient-wise. | |
template<typename CustomViewOp > | |
const 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 23 of file CommonCwiseUnaryOps.h.
typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, const Derived> ImagReturnType |
Definition at line 35 of file CommonCwiseUnaryOps.h.
typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType |
Definition at line 37 of file CommonCwiseUnaryOps.h.
typedef internal::conditional<NumTraits<Scalar>::IsComplex, CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>, Derived& >::type NonConstRealReturnType |
Definition at line 33 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 28 of file CommonCwiseUnaryOps.h.
typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, const Derived> ScalarMultipleReturnType |
Definition at line 16 of file CommonCwiseUnaryOps.h.
typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, const Derived> ScalarQuotient1ReturnType |
Definition at line 18 of file CommonCwiseUnaryOps.h.
internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>, const Derived> >::type cast | ( | ) | const |
The template parameter NewScalar is the type we are casting the scalars to.
Definition at line 92 of file CommonCwiseUnaryOps.h.
ConjugateReturnType conjugate | ( | ) | const [inline] |
*this
.Definition at line 101 of file CommonCwiseUnaryOps.h.
NonConstImagReturnType imag | ( | ) | const [inline] |
*this
.*this
.Definition at line 116 of file CommonCwiseUnaryOps.h.
const ScalarMultipleReturnType operator* | ( | const Scalar & | scalar | ) | const [inline] |
*this
scaled by the scalar factor scalar Definition at line 49 of file CommonCwiseUnaryOps.h.
const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived> operator* | ( | const std::complex< Scalar > & | scalar | ) | const [inline] |
Overloaded for efficient real matrix times complex scalar value
Definition at line 69 of file CommonCwiseUnaryOps.h.
friend const ScalarMultipleReturnType operator* | ( | const Scalar & | scalar, |
const StorageBaseType & | matrix | ||
) | [inline] |
Definition at line 76 of file CommonCwiseUnaryOps.h.
friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived> operator* | ( | const std::complex< Scalar > & | scalar, |
const StorageBaseType & | matrix | ||
) | [inline] |
Definition at line 80 of file CommonCwiseUnaryOps.h.
const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>, const Derived> operator- | ( | ) | const [inline] |
*this
Definition at line 44 of file CommonCwiseUnaryOps.h.
const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>, const Derived> operator/ | ( | const Scalar & | scalar | ) | const [inline] |
*this
divided by the scalar value scalar Definition at line 61 of file CommonCwiseUnaryOps.h.
NonConstRealReturnType real | ( | ) | const [inline] |
*this
.*this
.Definition at line 110 of file CommonCwiseUnaryOps.h.
const CwiseUnaryOp<CustomUnaryOp, const Derived> unaryExpr | ( | const CustomUnaryOp & | func = CustomUnaryOp() | ) | const [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 139 of file CommonCwiseUnaryOps.h.
const CwiseUnaryView<CustomViewOp, const Derived> unaryViewExpr | ( | const CustomViewOp & | func = CustomViewOp() | ) | const [inline] |
The template parameter CustomUnaryOp is the type of the functor of the custom unary operator.
Example:
Output:
Definition at line 157 of file CommonCwiseUnaryOps.h.