Macros | Functions
ArrayCwiseBinaryOps.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EIGEN_MAKE_CWISE_COMP_OP(OP, COMPARATOR)
 
#define EIGEN_MAKE_CWISE_COMP_R_OP(OP, R_OP, RCOMPARATOR)
 

Functions

template<typename OtherDerived >
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE EIGEN_CWISE_BINARY_RETURN_TYPE (Derived, OtherDerived, product) operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
template<typename OtherDerived >
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
 
template<typename OtherDerived >
const EIGEN_DEVICE_FUNC CwiseBinaryOp< internal::scalar_boolean_xor_op, const Derived, const OtherDerived > operator^ (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
template<typename DerivedQ >
const CwiseBinaryOp< internal::scalar_zeta_op< Scalar >, const Derived, const DerivedQ > zeta (const EIGEN_CURRENT_STORAGE_BASE_CLASS< DerivedQ > &q) const
 

Macro Definition Documentation

◆ EIGEN_MAKE_CWISE_COMP_OP

#define EIGEN_MAKE_CWISE_COMP_OP (   OP,
  COMPARATOR 
)
Value:
template<typename OtherDerived> \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<Scalar, typename OtherDerived::Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived> \
OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
{ \
return CwiseBinaryOp<internal::scalar_cmp_op<Scalar, typename OtherDerived::Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const OtherDerived>(derived(), other.derived()); \
}\
typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar,Scalar, internal::cmp_ ## COMPARATOR>, const Derived, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> > Cmp ## COMPARATOR ## ReturnType; \
typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar,Scalar, internal::cmp_ ## COMPARATOR>, const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject>, const Derived > RCmp ## COMPARATOR ## ReturnType; \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Cmp ## COMPARATOR ## ReturnType \
OP(const Scalar& s) const { \
return this->OP(Derived::PlainObject::Constant(rows(), cols(), s)); \
} \
EIGEN_DEVICE_FUNC friend EIGEN_STRONG_INLINE const RCmp ## COMPARATOR ## ReturnType \
OP(const Scalar& s, const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& d) { \
return Derived::PlainObject::Constant(d.rows(), d.cols(), s).OP(d); \
}
Returns
an expression of the coefficient-wise power of *this to the given array of exponents.

This function computes the coefficient-wise power.

Example:

Array<double,1,3> x(8,25,3),
e(1./3.,0.5,2.);
cout << "[" << x << "]^[" << e << "] = " << x.pow(e) << endl; // using ArrayBase::pow
cout << "[" << x << "]^[" << e << "] = " << pow(x,e) << endl; // using Eigen::pow

Output:

 

Definition at line 134 of file ArrayCwiseBinaryOps.h.

◆ EIGEN_MAKE_CWISE_COMP_R_OP

#define EIGEN_MAKE_CWISE_COMP_R_OP (   OP,
  R_OP,
  RCOMPARATOR 
)
Value:
template<typename OtherDerived> \
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_cmp_op<typename OtherDerived::Scalar, Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived> \
OP(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const \
{ \
return CwiseBinaryOp<internal::scalar_cmp_op<typename OtherDerived::Scalar, Scalar, internal::cmp_##RCOMPARATOR>, const OtherDerived, const Derived>(other.derived(), derived()); \
} \
EIGEN_DEVICE_FUNC \
inline const RCmp ## RCOMPARATOR ## ReturnType \
OP(const Scalar& s) const { \
return Derived::PlainObject::Constant(rows(), cols(), s).R_OP(*this); \
} \
friend inline const Cmp ## RCOMPARATOR ## ReturnType \
OP(const Scalar& s, const Derived& d) { \
return d.R_OP(Derived::PlainObject::Constant(d.rows(), d.cols(), s)); \
}

Definition at line 152 of file ArrayCwiseBinaryOps.h.

Function Documentation

◆ EIGEN_CWISE_BINARY_RETURN_TYPE()

template<typename OtherDerived >
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE EIGEN_CWISE_BINARY_RETURN_TYPE ( Derived  ,
OtherDerived  ,
product   
) const &
Returns
an expression of the coefficient wise product of *this and other
See also
MatrixBase::cwiseProduct

Definition at line 8 of file ArrayCwiseBinaryOps.h.

◆ operator/()

template<typename OtherDerived >
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
Returns
an expression of the coefficient wise quotient of *this and other
See also
MatrixBase::cwiseQuotient

Definition at line 21 of file ArrayCwiseBinaryOps.h.

◆ operator^()

template<typename OtherDerived >
const EIGEN_DEVICE_FUNC CwiseBinaryOp<internal::scalar_boolean_xor_op, const Derived, const OtherDerived> operator^ ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const
inline
Returns
an expression of the coefficient-wise < operator of *this and other

Example:

Array3d v(1,2,3), w(3,2,1);
cout << (v<w) << endl;

Output:

See also
all(), any(), operator>(), operator<=()
Returns
an expression of the coefficient-wise <= operator of *this and other

Example:

Array3d v(1,2,3), w(3,2,1);
cout << (v<=w) << endl;

Output:

See also
all(), any(), operator>=(), operator<()
Returns
an expression of the coefficient-wise > operator of *this and other

Example:

Array3d v(1,2,3), w(3,2,1);
cout << (v>w) << endl;

Output:

See also
all(), any(), operator>=(), operator<()
Returns
an expression of the coefficient-wise >= operator of *this and other

Example:

Array3d v(1,2,3), w(3,2,1);
cout << (v>=w) << endl;

Output:

See also
all(), any(), operator>(), operator<=()
Returns
an expression of the coefficient-wise == operator of *this and other
Warning
this performs an exact comparison, which is generally a bad idea with floating-point types. In order to check for equality between two vectors or matrices with floating-point coefficients, it is generally a far better idea to use a fuzzy comparison as provided by isApprox() and isMuchSmallerThan().

Example:

Array3d v(1,2,3), w(3,2,1);
cout << (v==w) << endl;

Output:

See also
all(), any(), isApprox(), isMuchSmallerThan()
Returns
an expression of the coefficient-wise != operator of *this and other
Warning
this performs an exact comparison, which is generally a bad idea with floating-point types. In order to check for equality between two vectors or matrices with floating-point coefficients, it is generally a far better idea to use a fuzzy comparison as provided by isApprox() and isMuchSmallerThan().

Example:

Array3d v(1,2,3), w(3,2,1);
cout << (v!=w) << endl;

Output:

See also
all(), any(), isApprox(), isMuchSmallerThan()
Returns
an expression of the coefficient-wise ^ operator of *this and other
Warning
this operator is for expression of bool only.

Example:

Array3d v(-1,2,1), w(-3,2,3);
cout << ((v<w) ^ (v<0)) << endl;

Output:

See also
operator&&(), select()

Definition at line 310 of file ArrayCwiseBinaryOps.h.

◆ zeta()

template<typename DerivedQ >
const CwiseBinaryOp<internal::scalar_zeta_op<Scalar>, const Derived, const DerivedQ> zeta ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< DerivedQ > &  q) const
inline
Returns
an expression of the coefficient-wise zeta function.

\specialfunctions_module

It returns the Riemann zeta function of two arguments *this and q:

Parameters
qis the shift, it must be > 0
Note
*this is the exponent, it must be > 1.
This function supports only float and double scalar types. To support other scalar types, the user has to provide implementations of zeta(T,T) for any scalar type T to be supported.

This method is an alias for zeta(*this,q);

See also
Eigen::zeta()

Definition at line 355 of file ArrayCwiseBinaryOps.h.

w
RowVector3d w
Definition: Matrix_resize_int.cpp:3
s
RealScalar s
Definition: level1_cplx_impl.h:126
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
d
static const double d[K][N]
Definition: igam.h:11
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
rows
int rows
Definition: Tutorial_commainit_02.cpp:1
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::ArrayBase::pow
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_pow_op< typename Derived::Scalar, typename ExponentDerived::Scalar >, const Derived, const ExponentDerived > pow(const Eigen::ArrayBase< Derived > &x, const Eigen::ArrayBase< ExponentDerived > &exponents)
Definition: GlobalFunctions.h:143
OP
#define OP(X)
Definition: gtsam/3rdparty/Eigen/blas/common.h:47
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
cols
int cols
Definition: Tutorial_commainit_02.cpp:1
pybind_wrapper_test_script.other
other
Definition: pybind_wrapper_test_script.py:42
Scalar
SCALAR Scalar
Definition: bench_gemm.cpp:46


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:43:14