WPILibC++ 2023.4.3
ArrayCwiseBinaryOps.h File Reference

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 EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE (Derived, OtherDerived, product) operator*(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const 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 >
EIGEN_DEVICE_FUNC const 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); \
}
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
Returns
an expression of the coefficient-wise power of *this to the given array of exponents.

This function computes the coefficient-wise power.

Example:

Output:

 

◆ 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)); \
}

Function Documentation

◆ EIGEN_CWISE_BINARY_RETURN_TYPE()

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const 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

◆ operator/()

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const 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

◆ operator^()

template<typename OtherDerived >
EIGEN_DEVICE_FUNC const 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:

Output:

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

Example:

Output:

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

Example:

Output:

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

Example:

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:

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:

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:

Output:

See also
operator&&(), select()

◆ 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()