CommonCwiseBinaryOps.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // Copyright (C) 2008-2016 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 a base class plugin containing common coefficient wise functions.
12 
19 EIGEN_MAKE_CWISE_BINARY_OP(operator-,difference)
20 
21 
27 EIGEN_MAKE_CWISE_BINARY_OP(operator+,sum)
28 
29 
40 template<typename CustomBinaryOp, typename OtherDerived>
42 EIGEN_STRONG_INLINE const CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>
43 binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other, const CustomBinaryOp& func = CustomBinaryOp()) const
44 {
45  return CwiseBinaryOp<CustomBinaryOp, const Derived, const OtherDerived>(derived(), other.derived(), func);
46 }
47 
48 
49 #ifndef EIGEN_PARSED_BY_DOXYGEN
51 #else
52 
56 template<typename T>
57 const CwiseBinaryOp<internal::scalar_product_op<Scalar,T>,Derived,Constant<T> > operator*(const T& scalar) const;
62 template<typename T> friend
63 const CwiseBinaryOp<internal::scalar_product_op<T,Scalar>,Constant<T>,Derived> operator*(const T& scalar, const StorageBaseType& expr);
64 #endif
65 
66 
67 
68 #ifndef EIGEN_PARSED_BY_DOXYGEN
70 #else
71 
75 template<typename T>
76 const CwiseBinaryOp<internal::scalar_quotient_op<Scalar,T>,Derived,Constant<T> > operator/(const T& scalar) const;
77 #endif
78 
88 template<typename OtherDerived>
90 inline const CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>
91 operator&&(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
92 {
94  THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
95  return CwiseBinaryOp<internal::scalar_boolean_and_op, const Derived, const OtherDerived>(derived(),other.derived());
96 }
97 
107 template<typename OtherDerived>
109 inline const CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>
110 operator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
111 {
113  THIS_METHOD_IS_ONLY_FOR_EXPRESSIONS_OF_BOOL);
114  return CwiseBinaryOp<internal::scalar_boolean_or_op, const Derived, const OtherDerived>(derived(),other.derived());
115 }
EIGEN_DEVICE_FUNC
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:976
EIGEN_MAKE_CWISE_BINARY_OP
#define EIGEN_MAKE_CWISE_BINARY_OP(METHOD, OPNAME)
Definition: Macros.h:1336
scalar
mxArray * scalar(mxClassID classid)
Definition: matlab.h:82
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
binaryExpr
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE CwiseBinaryOp< CustomBinaryOp, const Derived, const OtherDerived > binaryExpr(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other, const CustomBinaryOp &func=CustomBinaryOp()) const
Definition: CommonCwiseBinaryOps.h:43
Eigen::Triplet
A small structure to hold a non zero as a triplet (i,j,value).
Definition: SparseUtil.h:162
EIGEN_STATIC_ASSERT
#define EIGEN_STATIC_ASSERT(CONDITION, MSG)
Definition: StaticAssert.h:127
operator/
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE CwiseBinaryOp< internal::scalar_quotient_op< Scalar, typename OtherDerived::Scalar >, const Derived, const OtherDerived > operator/(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Definition: ArrayCwiseBinaryOps.h:21
product
void product(const MatrixType &m)
Definition: product.h:20
operator&&
const EIGEN_DEVICE_FUNC CwiseBinaryOp< internal::scalar_boolean_and_op, const Derived, const OtherDerived > operator&&(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Definition: CommonCwiseBinaryOps.h:91
func
Definition: benchGeometry.cpp:23
EIGEN_MAKE_SCALAR_BINARY_OP
#define EIGEN_MAKE_SCALAR_BINARY_OP(METHOD, OPNAME)
Definition: Macros.h:1380
operator||
const EIGEN_DEVICE_FUNC CwiseBinaryOp< internal::scalar_boolean_or_op, const Derived, const OtherDerived > operator||(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
Definition: CommonCwiseBinaryOps.h:110
test_callbacks.value
value
Definition: test_callbacks.py:160
pybind_wrapper_test_script.other
other
Definition: pybind_wrapper_test_script.py:42
EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT
#define EIGEN_MAKE_SCALAR_BINARY_OP_ONTHERIGHT(METHOD, OPNAME)
Definition: Macros.h:1362
Eigen::UniformScaling::operator*
operator*(const MatrixBase< Derived > &matrix, const UniformScaling< Scalar > &s)
Definition: Eigen/src/Geometry/Scaling.h:135


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:32:08