Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:56:38

0001 // This file is part of Eigen, a lightweight C++ template library
0002 // for linear algebra.
0003 //
0004 // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
0005 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
0006 //
0007 // This Source Code Form is subject to the terms of the Mozilla
0008 // Public License v. 2.0. If a copy of the MPL was not distributed
0009 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
0010 
0011 // This file is included into the body of the base classes supporting matrix specific coefficient-wise functions.
0012 // This include MatrixBase and SparseMatrixBase.
0013 
0014 
0015 typedef CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived> CwiseAbsReturnType;
0016 typedef CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived> CwiseAbs2ReturnType;
0017 typedef CwiseUnaryOp<internal::scalar_arg_op<Scalar>, const Derived> CwiseArgReturnType;
0018 typedef CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived> CwiseSqrtReturnType;
0019 typedef CwiseUnaryOp<internal::scalar_sign_op<Scalar>, const Derived> CwiseSignReturnType;
0020 typedef CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived> CwiseInverseReturnType;
0021 
0022 /// \returns an expression of the coefficient-wise absolute value of \c *this
0023 ///
0024 /// Example: \include MatrixBase_cwiseAbs.cpp
0025 /// Output: \verbinclude MatrixBase_cwiseAbs.out
0026 ///
0027 EIGEN_DOC_UNARY_ADDONS(cwiseAbs,absolute value)
0028 ///
0029 /// \sa cwiseAbs2()
0030 ///
0031 EIGEN_DEVICE_FUNC
0032 EIGEN_STRONG_INLINE const CwiseAbsReturnType
0033 cwiseAbs() const { return CwiseAbsReturnType(derived()); }
0034 
0035 /// \returns an expression of the coefficient-wise squared absolute value of \c *this
0036 ///
0037 /// Example: \include MatrixBase_cwiseAbs2.cpp
0038 /// Output: \verbinclude MatrixBase_cwiseAbs2.out
0039 ///
0040 EIGEN_DOC_UNARY_ADDONS(cwiseAbs2,squared absolute value)
0041 ///
0042 /// \sa cwiseAbs()
0043 ///
0044 EIGEN_DEVICE_FUNC
0045 EIGEN_STRONG_INLINE const CwiseAbs2ReturnType
0046 cwiseAbs2() const { return CwiseAbs2ReturnType(derived()); }
0047 
0048 /// \returns an expression of the coefficient-wise square root of *this.
0049 ///
0050 /// Example: \include MatrixBase_cwiseSqrt.cpp
0051 /// Output: \verbinclude MatrixBase_cwiseSqrt.out
0052 ///
0053 EIGEN_DOC_UNARY_ADDONS(cwiseSqrt,square-root)
0054 ///
0055 /// \sa cwisePow(), cwiseSquare()
0056 ///
0057 EIGEN_DEVICE_FUNC
0058 inline const CwiseSqrtReturnType
0059 cwiseSqrt() const { return CwiseSqrtReturnType(derived()); }
0060 
0061 /// \returns an expression of the coefficient-wise signum of *this.
0062 ///
0063 /// Example: \include MatrixBase_cwiseSign.cpp
0064 /// Output: \verbinclude MatrixBase_cwiseSign.out
0065 ///
0066 EIGEN_DOC_UNARY_ADDONS(cwiseSign,sign function)
0067 ///
0068 EIGEN_DEVICE_FUNC
0069 inline const CwiseSignReturnType
0070 cwiseSign() const { return CwiseSignReturnType(derived()); }
0071 
0072 
0073 /// \returns an expression of the coefficient-wise inverse of *this.
0074 ///
0075 /// Example: \include MatrixBase_cwiseInverse.cpp
0076 /// Output: \verbinclude MatrixBase_cwiseInverse.out
0077 ///
0078 EIGEN_DOC_UNARY_ADDONS(cwiseInverse,inverse)
0079 ///
0080 /// \sa cwiseProduct()
0081 ///
0082 EIGEN_DEVICE_FUNC
0083 inline const CwiseInverseReturnType
0084 cwiseInverse() const { return CwiseInverseReturnType(derived()); }
0085 
0086 /// \returns an expression of the coefficient-wise phase angle of \c *this
0087 ///
0088 /// Example: \include MatrixBase_cwiseArg.cpp
0089 /// Output: \verbinclude MatrixBase_cwiseArg.out
0090 ///
0091 EIGEN_DOC_UNARY_ADDONS(cwiseArg,arg)
0092 
0093 EIGEN_DEVICE_FUNC
0094 inline const CwiseArgReturnType
0095 cwiseArg() const { return CwiseArgReturnType(derived()); }