13 #ifndef EIGEN_PARSED_BY_DOXYGEN
16 typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
17 const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,
const Derived>,
19 > ConjugateReturnType;
21 typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
22 const CwiseUnaryOp<internal::scalar_real_op<Scalar>,
const Derived>,
26 typedef std::conditional_t<NumTraits<Scalar>::IsComplex,
27 CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>,
29 > NonConstRealReturnType;
31 typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>,
const Derived> ImagReturnType;
33 typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType;
35 typedef CwiseUnaryOp<internal::scalar_opposite_op<Scalar>,
const Derived> NegativeReturnType;
44 inline const NegativeReturnType
45 operator-()
const {
return NegativeReturnType(derived()); }
48 template<
class NewType>
struct CastXpr {
typedef typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::core_cast_op<Scalar, NewType>,
const Derived> >::type
Type; };
59 template<
typename NewType>
73 inline ConjugateReturnType
76 return ConjugateReturnType(derived());
86 inline std::conditional_t<Cond,ConjugateReturnType,const Derived&>
89 typedef std::conditional_t<Cond,ConjugateReturnType,const Derived&> ReturnType;
90 return ReturnType(derived());
100 real()
const {
return RealReturnType(derived()); }
108 inline const ImagReturnType
109 imag()
const {
return ImagReturnType(derived()); }
132 template<
typename CustomUnaryOp>
134 inline const CwiseUnaryOp<CustomUnaryOp, const Derived>
135 unaryExpr(
const CustomUnaryOp& func = CustomUnaryOp())
const
137 return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
153 template<
typename CustomViewOp>
155 inline const CwiseUnaryView<CustomViewOp, const Derived>
158 return CwiseUnaryView<CustomViewOp, const Derived>(derived(), func);
167 inline NonConstRealReturnType
168 real() {
return NonConstRealReturnType(derived()); }
176 inline NonConstImagReturnType
177 imag() {
return NonConstImagReturnType(derived()); }
#define EIGEN_DOC_UNARY_ADDONS(X, Y)
const ImagReturnType imag() const
CastXpr< NewType >::Type cast() const
RealReturnType real() const
std::conditional_t< Cond, ConjugateReturnType, const Derived & > conjugateIf() const
const CwiseUnaryOp< CustomUnaryOp, const Derived > unaryExpr(const CustomUnaryOp &func=CustomUnaryOp()) const
Apply a unary operator coefficient-wise.
const CwiseUnaryView< CustomViewOp, const Derived > unaryViewExpr(const CustomViewOp &func=CustomViewOp()) const
ConjugateReturnType conjugate() const
const NegativeReturnType operator-() const
#define EIGEN_DEVICE_FUNC
internal::cast_return_type< Derived, const CwiseUnaryOp< internal::core_cast_op< Scalar, NewType >, const Derived > >::type Type