28 #ifndef EIGEN_PARSED_BY_DOXYGEN
31 typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>,
const Derived> ScalarMultipleReturnType;
33 typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>,
const Derived> ScalarQuotient1ReturnType;
36 const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,
const Derived>,
38 >::type ConjugateReturnType;
41 const CwiseUnaryOp<internal::scalar_real_op<Scalar>,
const Derived>,
43 >::type RealReturnType;
46 CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>,
48 >::type NonConstRealReturnType;
50 typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>,
const Derived> ImagReturnType;
52 typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType;
54 #endif // not EIGEN_PARSED_BY_DOXYGEN
58 inline const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>,
const Derived>
63 inline const ScalarMultipleReturnType
66 return CwiseUnaryOp<internal::scalar_multiple_op<Scalar>,
const Derived>
67 (derived(), internal::scalar_multiple_op<Scalar>(scalar));
70 #ifdef EIGEN_PARSED_BY_DOXYGEN
71 const ScalarMultipleReturnType
operator*(
const RealScalar& scalar)
const;
75 inline const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>,
const Derived>
78 return CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>,
const Derived>
79 (derived(), internal::scalar_quotient1_op<Scalar>(scalar));
83 inline const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >,
const Derived>
86 return CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >,
const Derived>
87 (*
static_cast<const Derived*
>(
this), internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >(scalar));
90 inline friend const ScalarMultipleReturnType
91 operator*(
const Scalar& scalar,
const StorageBaseType& matrix)
92 {
return matrix*scalar; }
94 inline friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >,
const Derived>
95 operator*(
const std::complex<Scalar>& scalar,
const StorageBaseType& matrix)
96 {
return matrix*scalar; }
105 template<
typename NewType>
106 typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>,
const Derived> >::type
115 inline ConjugateReturnType
118 return ConjugateReturnType(derived());
124 inline RealReturnType
125 real()
const {
return derived(); }
130 inline const ImagReturnType
131 imag()
const {
return derived(); }
152 template<
typename CustomUnaryOp>
153 inline const CwiseUnaryOp<CustomUnaryOp, const Derived>
154 unaryExpr(
const CustomUnaryOp& func = CustomUnaryOp())
const
156 return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
170 template<
typename CustomViewOp>
171 inline const CwiseUnaryView<CustomViewOp, const Derived>
174 return CwiseUnaryView<CustomViewOp, const Derived>(derived(), func);
180 inline NonConstRealReturnType
181 real() {
return derived(); }
186 inline NonConstImagReturnType
187 imag() {
return derived(); }