WPILibC++ 2023.4.3-108-ge5452e3
MatrixCwiseBinaryOps.h File Reference

Go to the source code of this file.

Typedefs

typedef CwiseBinaryOp< internal::scalar_cmp_op< Scalar, Scalar, internal::cmp_EQ >, const Derived, const ConstantReturnType > CwiseScalarEqualReturnType
 

Functions

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const EIGEN_CWISE_BINARY_RETURN_TYPE (Derived, OtherDerived, product) cwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const CwiseBinaryOp< numext::equal_to< Scalar >, const Derived, const OtherDerived > cwiseEqual (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC const CwiseBinaryOp< numext::not_equal_to< Scalar >, const Derived, const OtherDerived > cwiseNotEqual (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar >, const Derived, const OtherDerived > cwiseMin (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar >, const Derived, const ConstantReturnType > cwiseMin (const Scalar &other) const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar >, const Derived, const OtherDerived > cwiseMax (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar >, const Derived, const ConstantReturnType > cwiseMax (const Scalar &other) const
 
template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const Derived, const OtherDerived > cwiseQuotient (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
 
EIGEN_DEVICE_FUNC const CwiseScalarEqualReturnType cwiseEqual (const Scalar &s) const
 

Typedef Documentation

◆ CwiseScalarEqualReturnType

typedef CwiseBinaryOp<internal::scalar_cmp_op<Scalar,Scalar,internal::cmp_EQ>, const Derived, const ConstantReturnType> CwiseScalarEqualReturnType

Function Documentation

◆ cwiseEqual() [1/2]

template<typename OtherDerived >
EIGEN_DEVICE_FUNC const CwiseBinaryOp< numext::equal_to< Scalar >, const Derived, const OtherDerived > cwiseEqual ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const
inline
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
cwiseNotEqual(), isApprox(), isMuchSmallerThan()

◆ cwiseEqual() [2/2]

EIGEN_DEVICE_FUNC const CwiseScalarEqualReturnType cwiseEqual ( const Scalar &  s) const
inline
Returns
an expression of the coefficient-wise == operator of *this and a scalar s
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().
See also
cwiseEqual(const MatrixBase<OtherDerived> &) const

◆ cwiseMax() [1/2]

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar >, const Derived, const OtherDerived > cwiseMax ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const
Returns
an expression of the coefficient-wise max of *this and other

Example:

Output:

See also
class CwiseBinaryOp, min()

◆ cwiseMax() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_max_op< Scalar, Scalar >, const Derived, const ConstantReturnType > cwiseMax ( const Scalar &  other) const
Returns
an expression of the coefficient-wise max of *this and scalar other
See also
class CwiseBinaryOp, min()

◆ cwiseMin() [1/2]

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar >, const Derived, const OtherDerived > cwiseMin ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const
Returns
an expression of the coefficient-wise min of *this and other

Example:

Output:

See also
class CwiseBinaryOp, max()

◆ cwiseMin() [2/2]

EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_min_op< Scalar, Scalar >, const Derived, const ConstantReturnType > cwiseMin ( const Scalar &  other) const
Returns
an expression of the coefficient-wise min of *this and scalar other
See also
class CwiseBinaryOp, min()

◆ cwiseNotEqual()

template<typename OtherDerived >
EIGEN_DEVICE_FUNC const CwiseBinaryOp< numext::not_equal_to< Scalar >, const Derived, const OtherDerived > cwiseNotEqual ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const
inline
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
cwiseEqual(), isApprox(), isMuchSmallerThan()

◆ cwiseQuotient()

template<typename OtherDerived >
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const CwiseBinaryOp< internal::scalar_quotient_op< Scalar >, const Derived, const OtherDerived > cwiseQuotient ( const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &  other) const
Returns
an expression of the coefficient-wise quotient of *this and other

Example:

Output:

See also
class CwiseBinaryOp, cwiseProduct(), cwiseInverse()

◆ 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 Schur product (coefficient wise product) of *this and other

Example:

Output:

See also
class CwiseBinaryOp, cwiseAbs2