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

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

Typedef Documentation

◆ CwiseScalarEqualReturnType

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

Definition at line 136 of file MatrixCwiseBinaryOps.h.

Function Documentation

◆ cwiseEqual() [1/2]

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

MatrixXi m(2,2);
m << 1, 0,
1, 1;
cout << "Comparing m with identity matrix:" << endl;
cout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl;
Index count = m.cwiseEqual(MatrixXi::Identity(2,2)).count();
cout << "Number of coefficients that are equal: " << count << endl;

Output:

See also
cwiseNotEqual(), isApprox(), isMuchSmallerThan()

Definition at line 43 of file MatrixCwiseBinaryOps.h.

◆ cwiseEqual() [2/2]

const EIGEN_DEVICE_FUNC 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

Definition at line 149 of file MatrixCwiseBinaryOps.h.

◆ cwiseMax() [1/2]

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

Vector3d v(2,3,4), w(4,2,3);
cout << v.cwiseMax(w) << endl;

Output:

See also
class CwiseBinaryOp, min()

Definition at line 104 of file MatrixCwiseBinaryOps.h.

◆ cwiseMax() [2/2]

EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE 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()

Definition at line 115 of file MatrixCwiseBinaryOps.h.

◆ cwiseMin() [1/2]

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

Vector3d v(2,3,4), w(4,2,3);
cout << v.cwiseMin(w) << endl;

Output:

See also
class CwiseBinaryOp, max()

Definition at line 78 of file MatrixCwiseBinaryOps.h.

◆ cwiseMin() [2/2]

EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE 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()

Definition at line 89 of file MatrixCwiseBinaryOps.h.

◆ cwiseNotEqual()

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

MatrixXi m(2,2);
m << 1, 0,
1, 1;
cout << "Comparing m with identity matrix:" << endl;
cout << m.cwiseNotEqual(MatrixXi::Identity(2,2)) << endl;
Index count = m.cwiseNotEqual(MatrixXi::Identity(2,2)).count();
cout << "Number of coefficients that are not equal: " << count << endl;

Output:

See also
cwiseEqual(), isApprox(), isMuchSmallerThan()

Definition at line 63 of file MatrixCwiseBinaryOps.h.

◆ cwiseQuotient()

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

Vector3d v(2,3,4), w(4,2,3);
cout << v.cwiseQuotient(w) << endl;

Output:

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

Definition at line 131 of file MatrixCwiseBinaryOps.h.

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

Example:

Matrix3i a = Matrix3i::Random(), b = Matrix3i::Random();
Matrix3i c = a.cwiseProduct(b);
cout << "a:\n" << a << "\nb:\n" << b << "\nc:\n" << c << endl;

Output:

See also
class CwiseBinaryOp, cwiseAbs2

Definition at line 22 of file MatrixCwiseBinaryOps.h.

w
RowVector3d w
Definition: Matrix_resize_int.cpp:3
c
Scalar Scalar * c
Definition: benchVecAdd.cpp:17
b
Scalar * b
Definition: benchVecAdd.cpp:17
m
Matrix3f m
Definition: AngleAxis_mimic_euler.cpp:1
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
v
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:18:31