13 #ifndef EIGEN_PARSED_BY_DOXYGEN 20 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
21 const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,
const Derived>,
25 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
26 const CwiseUnaryOp<internal::scalar_real_op<Scalar>,
const Derived>,
30 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
31 CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>,
35 typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>,
const Derived>
ImagReturnType;
39 #endif // not EIGEN_PARSED_BY_DOXYGEN 43 inline const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>,
const Derived>
51 return CwiseUnaryOp<internal::scalar_multiple_op<Scalar>,
const Derived>
52 (derived(), internal::scalar_multiple_op<Scalar>(scalar));
55 #ifdef EIGEN_PARSED_BY_DOXYGEN 60 inline const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>,
const Derived>
63 return CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>,
const Derived>
64 (derived(), internal::scalar_quotient1_op<Scalar>(scalar));
68 inline const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >,
const Derived>
71 return CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >,
const Derived>
72 (*
static_cast<const Derived*
>(
this), internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >(scalar));
76 operator*(
const Scalar& scalar,
const StorageBaseType& matrix)
77 {
return matrix*scalar; }
79 inline friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >,
const Derived>
80 operator*(
const std::complex<Scalar>& scalar,
const StorageBaseType& matrix)
81 {
return matrix*scalar; }
90 template<
typename NewType>
91 typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>,
const Derived> >::type
110 real()
const {
return derived(); }
116 imag()
const {
return derived(); }
137 template<
typename CustomUnaryOp>
138 inline const CwiseUnaryOp<CustomUnaryOp, const Derived>
139 unaryExpr(
const CustomUnaryOp& func = CustomUnaryOp())
const 141 return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
155 template<
typename CustomViewOp>
156 inline const CwiseUnaryView<CustomViewOp, const Derived>
159 return CwiseUnaryView<CustomViewOp, const Derived>(derived(), func);
166 real() {
return derived(); }
172 imag() {
return derived(); }
const CwiseUnaryOp< internal::scalar_opposite_op< typename internal::traits< Derived >::Scalar >, const Derived > operator-() const
CwiseUnaryOp< internal::scalar_multiple_op< Scalar >, const Derived > ScalarMultipleReturnType
internal::conditional< NumTraits< Scalar >::IsComplex, const CwiseUnaryOp< internal::scalar_real_op< Scalar >, const Derived >, const Derived & >::type RealReturnType
const ImagReturnType imag() const
const CwiseUnaryOp< CustomUnaryOp, const Derived > unaryExpr(const CustomUnaryOp &func=CustomUnaryOp()) const
Apply a unary operator coefficient-wise.
const CwiseUnaryOp< internal::scalar_quotient1_op< typename internal::traits< Derived >::Scalar >, const Derived > operator/(const Scalar &scalar) const
RealReturnType real() const
const CwiseUnaryView< CustomViewOp, const Derived > unaryViewExpr(const CustomViewOp &func=CustomViewOp()) const
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
CwiseUnaryView< internal::scalar_imag_ref_op< Scalar >, Derived > NonConstImagReturnType
const ScalarMultipleReturnType operator*(const Scalar &scalar) const
CwiseUnaryOp< internal::scalar_quotient1_op< Scalar >, const Derived > ScalarQuotient1ReturnType
internal::conditional< NumTraits< Scalar >::IsComplex, const CwiseUnaryOp< internal::scalar_conjugate_op< Scalar >, const Derived >, const Derived & >::type ConjugateReturnType
CwiseUnaryOp< internal::scalar_imag_op< Scalar >, const Derived > ImagReturnType
internal::conditional< NumTraits< Scalar >::IsComplex, CwiseUnaryView< internal::scalar_real_ref_op< Scalar >, Derived >, Derived & >::type NonConstRealReturnType