Main MRPT website > C++ reference
MRPT logo
Functions

CommonCwiseUnaryOps.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const CwiseUnaryOp
< internal::scalar_opposite_op
< typename internal::traits
< Derived >::Scalar >, Derived > 
operator- () const
const ScalarMultipleReturnType operator* (const Scalar &scalar) const
const ScalarMultipleReturnType operator* (const RealScalar &scalar) const
const CwiseUnaryOp
< internal::scalar_quotient1_op
< typename internal::traits
< Derived >::Scalar >, Derived > 
operator/ (const Scalar &scalar) const
const CwiseUnaryOp
< internal::scalar_multiple2_op
< Scalar, std::complex< Scalar >
>, Derived > 
operator* (const std::complex< Scalar > &scalar) const
 Overloaded for efficient real matrix times complex scalar value.
const ScalarMultipleReturnType operator* (const Scalar &scalar, const StorageBaseType &matrix)
const CwiseUnaryOp
< internal::scalar_multiple2_op
< Scalar, std::complex< Scalar >
>, Derived > 
operator* (const std::complex< Scalar > &scalar, const StorageBaseType &matrix)
template<typename NewType >
internal::cast_return_type
< Derived, const CwiseUnaryOp
< internal::scalar_cast_op
< typename internal::traits
< Derived >::Scalar, NewType >
, Derived > >::type 
cast () const
ConjugateReturnType conjugate () const
RealReturnType real () const
const ImagReturnType imag () const
template<typename CustomUnaryOp >
const CwiseUnaryOp
< CustomUnaryOp, Derived > 
unaryExpr (const CustomUnaryOp &func=CustomUnaryOp()) const
 Apply a unary operator coefficient-wise.
template<typename CustomViewOp >
const CwiseUnaryView
< CustomViewOp, Derived > 
unaryViewExpr (const CustomViewOp &func=CustomViewOp()) const

Function Documentation

template<typename NewType >
internal::cast_return_type<Derived,const CwiseUnaryOp<internal::scalar_cast_op<typename internal::traits<Derived>::Scalar, NewType>, Derived> >::type cast (  ) const
Returns:
an expression of *this with the Scalar type casted to NewScalar.

The template parameter NewScalar is the type we are casting the scalars to.

See also:
class CwiseUnaryOp

Definition at line 107 of file CommonCwiseUnaryOps.h.

Referenced by HouseholderSequence< VectorsType, CoeffsType, Side >::operator*().

ConjugateReturnType conjugate (  ) const [inline]
Returns:
an expression of the complex conjugate of *this.
See also:
adjoint()

Definition at line 116 of file CommonCwiseUnaryOps.h.

Referenced by QuaternionBase< Derived >::inverse().

NonConstImagReturnType imag (  ) const [inline]
const ScalarMultipleReturnType operator* ( const Scalar &  scalar ) const [inline]
Returns:
an expression of *this scaled by the scalar factor scalar

Definition at line 64 of file CommonCwiseUnaryOps.h.

const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived> operator* ( const std::complex< Scalar > &  scalar ) const [inline]

Overloaded for efficient real matrix times complex scalar value.

Definition at line 84 of file CommonCwiseUnaryOps.h.

const ScalarMultipleReturnType operator* ( const RealScalar &  scalar ) const
friend const ScalarMultipleReturnType operator* ( const Scalar &  scalar,
const StorageBaseType &  matrix 
) [inline]

Definition at line 91 of file CommonCwiseUnaryOps.h.

friend const CwiseUnaryOp<internal::scalar_multiple2_op<Scalar,std::complex<Scalar> >, Derived> operator* ( const std::complex< Scalar > &  scalar,
const StorageBaseType &  matrix 
) [inline]

Definition at line 95 of file CommonCwiseUnaryOps.h.

const CwiseUnaryOp<internal::scalar_opposite_op<typename internal::traits<Derived>::Scalar>,Derived> operator- (  ) const [inline]
Returns:
an expression of the opposite of *this

Definition at line 59 of file CommonCwiseUnaryOps.h.

const CwiseUnaryOp<internal::scalar_quotient1_op<typename internal::traits<Derived>::Scalar>, Derived> operator/ ( const Scalar &  scalar ) const [inline]
Returns:
an expression of *this divided by the scalar value scalar

Definition at line 76 of file CommonCwiseUnaryOps.h.

NonConstRealReturnType real (  ) const [inline]
Returns:
a read-only expression of the real part of *this.
See also:
imag()
Returns:
a non const expression of the real part of *this.
See also:
imag()

Definition at line 125 of file CommonCwiseUnaryOps.h.

Referenced by SelfAdjointEigenSolver< _MatrixType >::compute(), ComplexSchur< MatrixType >::computeShift(), EigenSolver< _MatrixType >::doComputeEigenvectors(), ei_real(), internal::EIGEN_MATHFUNC_RETVAL(), EigenSolver< _MatrixType >::eigenvectors(), JacobiRotation< Scalar >::makeGivens(), MatrixBase< Derived >::makeHouseholder(), JacobiRotation< Scalar >::makeJacobi(), internal::symm_pack_rhs< Scalar, Index, nr, StorageOrder >::operator()(), internal::symm_pack_lhs< Scalar, Index, Pack1, Pack2, StorageOrder >::operator()(), internal::scalar_real_op< Scalar >::operator()(), internal::symm_pack_lhs< Scalar, Index, Pack1, Pack2, StorageOrder >::pack(), internal::pmul(), internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, true, true >::pmul(), internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, true, false >::pmul(), internal::conj_helper< std::complex< RealScalar >, std::complex< RealScalar >, false, true >::pmul(), internal::product_selfadjoint_vector(), EigenSolver< _MatrixType >::pseudoEigenvalueMatrix(), internal::real_2x2_jacobi_svd(), internal::tridiagonalization_inplace_selector< MatrixType, 1, IsComplex >::run(), internal::tridiagonalization_inplace_selector< MatrixType, Size, IsComplex >::run(), internal::triangular_assignment_selector< Derived1, Derived2,(SelfAdjoint|Lower), UnrollCount, ClearOpposite >::run(), internal::triangular_assignment_selector< Derived1, Derived2,(SelfAdjoint|Upper), UnrollCount, ClearOpposite >::run(), internal::random_default_impl< Scalar, true, false >::run(), internal::norm1_default_impl< Scalar, NumTraits< Scalar >::IsComplex >::run(), internal::real_impl< std::complex< RealScalar > >::run(), internal::get_factor< Scalar, typename NumTraits< Scalar >::Real >::run(), internal::sqrt(), SparseMatrixBase< Derived >::squaredNorm(), MatrixBase< Derived >::squaredNorm(), internal::llt_inplace< Lower >::unblocked(), internal::ldlt_inplace< Lower >::unblocked(), and internal::gebp_traits< std::complex< RealScalar >, std::complex< RealScalar >, _ConjLhs, _ConjRhs >::unpackRhs().

template<typename CustomUnaryOp >
const CwiseUnaryOp<CustomUnaryOp, Derived> unaryExpr ( const CustomUnaryOp &  func = CustomUnaryOp() ) const [inline]

Apply a unary operator coefficient-wise.

Parameters:
[in]funcFunctor implementing the unary operator
Template Parameters:
CustomUnaryOpType of func
Returns:
An expression of a custom coefficient-wise unary operator func of *this

The function ptr_fun() from the C++ standard library can be used to make functors out of normal functions.

Example:

Output:

Genuine functors allow for more possibilities, for instance it may contain a state.

Example:

Output:

See also:
class CwiseUnaryOp, class CwiseBinaryOp

Definition at line 154 of file CommonCwiseUnaryOps.h.

template<typename CustomViewOp >
const CwiseUnaryView<CustomViewOp, Derived> unaryViewExpr ( const CustomViewOp &  func = CustomViewOp() ) const [inline]
Returns:
an expression of a custom coefficient-wise unary operator func of *this

The template parameter CustomUnaryOp is the type of the functor of the custom unary operator.

Example:

Output:

See also:
class CwiseUnaryOp, class CwiseBinaryOp

Definition at line 172 of file CommonCwiseUnaryOps.h.




Page generated by Doxygen 1.7.2 for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011