![]() |
Eigen
3.3.3
|
00001 // This file is part of Eigen, a lightweight C++ template library 00002 // for linear algebra. 00003 // 00004 // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> 00005 // Copyright (C) 2006-2008 Benoit Jacob <jacob.benoit.1@gmail.com> 00006 // 00007 // This Source Code Form is subject to the terms of the Mozilla 00008 // Public License v. 2.0. If a copy of the MPL was not distributed 00009 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 00010 00011 // This file is included into the body of the base classes supporting matrix specific coefficient-wise functions. 00012 // This include MatrixBase and SparseMatrixBase. 00013 00014 00015 typedef CwiseUnaryOp<internal::scalar_abs_op<Scalar>, const Derived> CwiseAbsReturnType; 00016 typedef CwiseUnaryOp<internal::scalar_abs2_op<Scalar>, const Derived> CwiseAbs2ReturnType; 00017 typedef CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived> CwiseSqrtReturnType; 00018 typedef CwiseUnaryOp<internal::scalar_sign_op<Scalar>, const Derived> CwiseSignReturnType; 00019 typedef CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived> CwiseInverseReturnType; 00020 00026 EIGEN_DOC_UNARY_ADDONS(cwiseAbs,absolute value) 00030 EIGEN_DEVICE_FUNC 00031 EIGEN_STRONG_INLINE const CwiseAbsReturnType 00032 cwiseAbs() const { return CwiseAbsReturnType(derived()); } 00033 00039 EIGEN_DOC_UNARY_ADDONS(cwiseAbs2,squared absolute value) 00043 EIGEN_DEVICE_FUNC 00044 EIGEN_STRONG_INLINE const CwiseAbs2ReturnType 00045 cwiseAbs2() const { return CwiseAbs2ReturnType(derived()); } 00046 00052 EIGEN_DOC_UNARY_ADDONS(cwiseSqrt,square-root) 00056 EIGEN_DEVICE_FUNC 00057 inline const CwiseSqrtReturnType 00058 cwiseSqrt() const { return CwiseSqrtReturnType(derived()); } 00059 00065 EIGEN_DOC_UNARY_ADDONS(cwiseSign,sign function) 00067 EIGEN_DEVICE_FUNC 00068 inline const CwiseSignReturnType 00069 cwiseSign() const { return CwiseSignReturnType(derived()); } 00070 00071 00077 EIGEN_DOC_UNARY_ADDONS(cwiseInverse,inverse) 00081 EIGEN_DEVICE_FUNC 00082 inline const CwiseInverseReturnType 00083 cwiseInverse() const { return CwiseInverseReturnType(derived()); } 00084 00085