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

Go to the source code of this file.

Functions

template<typename OtherDerived >
const CwiseBinaryOp
< std::equal_to< Scalar >
, const Derived, const
OtherDerived > 
cwiseEqual (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
template<typename OtherDerived >
EIGEN_STRONG_INLINE const
CwiseBinaryOp
< internal::scalar_max_op
< Scalar >, const Derived,
const OtherDerived > 
cwiseMax (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
template<typename OtherDerived >
EIGEN_STRONG_INLINE const
CwiseBinaryOp
< internal::scalar_min_op
< Scalar >, const Derived,
const OtherDerived > 
cwiseMin (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
template<typename OtherDerived >
const CwiseBinaryOp
< std::not_equal_to< Scalar >
, const Derived, const
OtherDerived > 
cwiseNotEqual (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
template<typename OtherDerived >
EIGEN_STRONG_INLINE const
CwiseBinaryOp
< internal::scalar_quotient_op
< Scalar >, const Derived,
const OtherDerived > 
cwiseQuotient (const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const
template<typename OtherDerived >
EIGEN_STRONG_INLINE const EIGEN_CWISE_PRODUCT_RETURN_TYPE (Derived, OtherDerived) cwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS< OtherDerived > &other) const

Function Documentation

template<typename OtherDerived >
const CwiseBinaryOp<std::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;
int 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 56 of file MatrixCwiseBinaryOps.h.

template<typename OtherDerived >
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_max_op<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 103 of file MatrixCwiseBinaryOps.h.

template<typename OtherDerived >
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_min_op<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 89 of file MatrixCwiseBinaryOps.h.

template<typename OtherDerived >
const CwiseBinaryOp<std::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;
int 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 75 of file MatrixCwiseBinaryOps.h.

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

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

Output:

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

Definition at line 117 of file MatrixCwiseBinaryOps.h.

template<typename OtherDerived >
EIGEN_STRONG_INLINE const EIGEN_CWISE_PRODUCT_RETURN_TYPE ( Derived  ,
OtherDerived   
) 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 36 of file MatrixCwiseBinaryOps.h.



libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:34:06