Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef EIGEN_PARSED_BY_DOXYGEN
00029
00031 typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, const Derived> ScalarMultipleReturnType;
00033 typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, const Derived> ScalarQuotient1ReturnType;
00035 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
00036 const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, const Derived>,
00037 const Derived&
00038 >::type ConjugateReturnType;
00040 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
00041 const CwiseUnaryOp<internal::scalar_real_op<Scalar>, const Derived>,
00042 const Derived&
00043 >::type RealReturnType;
00045 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
00046 CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>,
00047 Derived&
00048 >::type NonConstRealReturnType;
00050 typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, const Derived> ImagReturnType;
00052 typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType;
00053
00054 #endif // not EIGEN_PARSED_BY_DOXYGEN
00055
00058 inline const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>, const Derived>
00059 operator-() const { return derived(); }
00060
00061
00063 inline const ScalarMultipleReturnType
00064 operator*(const Scalar& scalar) const
00065 {
00066 return CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, const Derived>
00067 (derived(), internal::scalar_multiple_op<Scalar>(scalar));
00068 }
00069
00070 #ifdef EIGEN_PARSED_BY_DOXYGEN
00071 const ScalarMultipleReturnType operator*(const RealScalar& scalar) const;
00072 #endif
00073
00075 inline const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>, const Derived>
00076 operator/(const Scalar& scalar) const
00077 {
00078 return CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, const Derived>
00079 (derived(), internal::scalar_quotient1_op<Scalar>(scalar));
00080 }
00081
00083 inline const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
00084 operator*(const std::complex<Scalar>& scalar) const
00085 {
00086 return CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
00087 (*static_cast<const Derived*>(this), internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >(scalar));
00088 }
00089
00090 inline friend const ScalarMultipleReturnType
00091 operator*(const Scalar& scalar, const StorageBaseType& matrix)
00092 { return matrix*scalar; }
00093
00094 inline friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, const Derived>
00095 operator*(const std::complex<Scalar>& scalar, const StorageBaseType& matrix)
00096 { return matrix*scalar; }
00097
00105 template<typename NewType>
00106 typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>, const Derived> >::type
00107 cast() const
00108 {
00109 return derived();
00110 }
00111
00115 inline ConjugateReturnType
00116 conjugate() const
00117 {
00118 return ConjugateReturnType(derived());
00119 }
00120
00124 inline RealReturnType
00125 real() const { return derived(); }
00126
00130 inline const ImagReturnType
00131 imag() const { return derived(); }
00132
00152 template<typename CustomUnaryOp>
00153 inline const CwiseUnaryOp<CustomUnaryOp, const Derived>
00154 unaryExpr(const CustomUnaryOp& func = CustomUnaryOp()) const
00155 {
00156 return CwiseUnaryOp<CustomUnaryOp, const Derived>(derived(), func);
00157 }
00158
00170 template<typename CustomViewOp>
00171 inline const CwiseUnaryView<CustomViewOp, const Derived>
00172 unaryViewExpr(const CustomViewOp& func = CustomViewOp()) const
00173 {
00174 return CwiseUnaryView<CustomViewOp, const Derived>(derived(), func);
00175 }
00176
00180 inline NonConstRealReturnType
00181 real() { return derived(); }
00182
00186 inline NonConstImagReturnType
00187 imag() { return derived(); }