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
00030
00031 typedef CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, Derived> ScalarMultipleReturnType;
00032
00033 typedef CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, Derived> ScalarQuotient1ReturnType;
00034
00035 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
00036 const CwiseUnaryOp<internal::scalar_conjugate_op<Scalar>, Derived>,
00037 const Derived&
00038 >::type ConjugateReturnType;
00039
00040 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
00041 const CwiseUnaryOp<internal::scalar_real_op<Scalar>, Derived>,
00042 const Derived&
00043 >::type RealReturnType;
00044
00045 typedef typename internal::conditional<NumTraits<Scalar>::IsComplex,
00046 CwiseUnaryView<internal::scalar_real_ref_op<Scalar>, Derived>,
00047 Derived&
00048 >::type NonConstRealReturnType;
00049
00050 typedef CwiseUnaryOp<internal::scalar_imag_op<Scalar>, Derived> ImagReturnType;
00051
00052 typedef CwiseUnaryView<internal::scalar_imag_ref_op<Scalar>, Derived> NonConstImagReturnType;
00053
00054 #endif // not EIGEN_PARSED_BY_DOXYGEN
00055
00056
00057
00058 inline const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>,Derived>
00059 operator-() const { return derived(); }
00060
00061
00062
00063 inline const ScalarMultipleReturnType
00064 operator*(const Scalar& scalar) const
00065 {
00066 return CwiseUnaryOp<internal::scalar_multiple_op<Scalar>, 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
00074
00075 inline const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>, Derived>
00076 operator/(const Scalar& scalar) const
00077 {
00078 return CwiseUnaryOp<internal::scalar_quotient1_op<Scalar>, Derived>
00079 (derived(), internal::scalar_quotient1_op<Scalar>(scalar));
00080 }
00081
00082
00083 inline const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived>
00084 operator*(const std::complex<Scalar>& scalar) const
00085 {
00086 return CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, 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> >, Derived>
00095 operator*(const std::complex<Scalar>& scalar, const StorageBaseType& matrix)
00096 { return matrix*scalar; }
00097
00098
00099
00100
00101
00102
00103
00104
00105 template<typename NewType>
00106 typename internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>, Derived> >::type
00107 cast() const
00108 {
00109 return derived();
00110 }
00111
00112
00113
00114
00115 inline ConjugateReturnType
00116 conjugate() const
00117 {
00118 return ConjugateReturnType(derived());
00119 }
00120
00121
00122
00123
00124 inline RealReturnType
00125 real() const { return derived(); }
00126
00127
00128
00129
00130 inline const ImagReturnType
00131 imag() const { return derived(); }
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152 template<typename CustomUnaryOp>
00153 inline const CwiseUnaryOp<CustomUnaryOp, Derived>
00154 unaryExpr(const CustomUnaryOp& func = CustomUnaryOp()) const
00155 {
00156 return CwiseUnaryOp<CustomUnaryOp, Derived>(derived(), func);
00157 }
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170 template<typename CustomViewOp>
00171 inline const CwiseUnaryView<CustomViewOp, Derived>
00172 unaryViewExpr(const CustomViewOp& func = CustomViewOp()) const
00173 {
00174 return CwiseUnaryView<CustomViewOp, Derived>(derived(), func);
00175 }
00176
00177
00178
00179
00180 inline NonConstRealReturnType
00181 real() { return derived(); }
00182
00183
00184
00185
00186 inline NonConstImagReturnType
00187 imag() { return derived(); }