Please, help us to better know about our user community by answering the following short survey: https://forms.gle/wpyrxWi18ox9Z5ae9
Eigen  3.4.0
 
Loading...
Searching...
No Matches
MatrixCwiseUnaryOps.h
1// This file is part of Eigen, a lightweight C++ template library
2// for linear algebra.
3//
4// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
5// Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com>
6//
7// This Source Code Form is subject to the terms of the Mozilla
8// Public License v. 2.0. If a copy of the MPL was not distributed
9// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10
11// This file is included into the body of the base classes supporting matrix specific coefficient-wise functions.
12// This include MatrixBase and SparseMatrixBase.
13
14
15typedef CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived> CwiseAbsReturnType;
16typedef CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived> CwiseAbs2ReturnType;
17typedef CwiseUnaryOp<internal::scalar_arg_op<Scalar>, const Derived> CwiseArgReturnType;
18typedef CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived> CwiseSqrtReturnType;
19typedef CwiseUnaryOp<internal::scalar_sign_op<Scalar>, const Derived> CwiseSignReturnType;
20typedef CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived> CwiseInverseReturnType;
21
27EIGEN_DOC_UNARY_ADDONS(cwiseAbs,absolute value)
31EIGEN_DEVICE_FUNC
32EIGEN_STRONG_INLINE const CwiseAbsReturnType
33cwiseAbs() const { return CwiseAbsReturnType(derived()); }
34
40EIGEN_DOC_UNARY_ADDONS(cwiseAbs2,squared absolute value)
44EIGEN_DEVICE_FUNC
45EIGEN_STRONG_INLINE const CwiseAbs2ReturnType
46cwiseAbs2() const { return CwiseAbs2ReturnType(derived()); }
47
53EIGEN_DOC_UNARY_ADDONS(cwiseSqrt,square-root)
57EIGEN_DEVICE_FUNC
58inline const CwiseSqrtReturnType
59cwiseSqrt() const { return CwiseSqrtReturnType(derived()); }
60
66EIGEN_DOC_UNARY_ADDONS(cwiseSign,sign function)
68EIGEN_DEVICE_FUNC
69inline const CwiseSignReturnType
70cwiseSign() const { return CwiseSignReturnType(derived()); }
71
72
78EIGEN_DOC_UNARY_ADDONS(cwiseInverse,inverse)
82EIGEN_DEVICE_FUNC
83inline const CwiseInverseReturnType
84cwiseInverse() const { return CwiseInverseReturnType(derived()); }
85
91EIGEN_DOC_UNARY_ADDONS(cwiseArg,arg)
92
93EIGEN_DEVICE_FUNC
94inline const CwiseArgReturnType
95cwiseArg() const { return CwiseArgReturnType(derived()); }