13 #ifndef EIGEN_PARSED_BY_DOXYGEN 16 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
17 const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>,
const Derived>,
19 >::type ConjugateReturnType;
21 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
22 const CwiseUnaryOp<internal::scalar_real_op<Scalar>,
const Derived>,
24 >::type RealReturnType;
26 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
27 CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>,
29 >::type 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;
37 #endif // not EIGEN_PARSED_BY_DOXYGEN 41 EIGEN_DOC_UNARY_ADDONS(
operator-,opposite)
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::scalar_cast_op<Scalar, NewType>,
const Derived> >::type Type; };
55 EIGEN_DOC_UNARY_ADDONS(cast,conversion
function)
59 template<
typename NewType>
61 typename CastXpr<NewType>::Type
64 return typename CastXpr<NewType>::Type(derived());
69 EIGEN_DOC_UNARY_ADDONS(conjugate,
complex conjugate)
73 inline ConjugateReturnType
76 return ConjugateReturnType(derived());
81 EIGEN_DOC_UNARY_ADDONS(real,real part
function)
86 real()
const {
return RealReturnType(derived()); }
90 EIGEN_DOC_UNARY_ADDONS(imag,imaginary part
function)
94 inline const ImagReturnType
95 imag()
const {
return ImagReturnType(derived()); }
114 EIGEN_DOC_UNARY_ADDONS(unaryExpr,unary
function)
118 template<
typename CustomUnaryOp>
120 inline const CwiseUnaryOp<CustomUnaryOp, const Derived>
121 unaryExpr(
const CustomUnaryOp&
func = CustomUnaryOp())
const 123 return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(),
func);
135 EIGEN_DOC_UNARY_ADDONS(unaryViewExpr,unary
function)
139 template<
typename CustomViewOp>
141 inline const CwiseUnaryView<CustomViewOp, const Derived>
142 unaryViewExpr(
const CustomViewOp&
func = CustomViewOp())
const 144 return CwiseUnaryView<CustomViewOp, const Derived>(derived(),
func);
149 EIGEN_DOC_UNARY_ADDONS(real,real part
function)
153 inline NonConstRealReturnType
154 real() {
return NonConstRealReturnType(derived()); }
158 EIGEN_DOC_UNARY_ADDONS(imag,imaginary part
function)
162 inline NonConstImagReturnType
163 imag() {
return NonConstImagReturnType(derived()); }
Definition: benchGeometry.cpp:23
Definition: CommonCwiseUnaryOps.h:48
Definition: datatypes.h:12