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

Go to the source code of this file.

Functions

EIGEN_STRONG_INLINE const
CwiseUnaryOp
< internal::scalar_abs_op
< Scalar >, const Derived > 
cwiseAbs () const
EIGEN_STRONG_INLINE const
CwiseUnaryOp
< internal::scalar_abs2_op
< Scalar >, const Derived > 
cwiseAbs2 () const
const CwiseUnaryOp
< std::binder1st
< std::equal_to< Scalar >
>, const Derived > 
cwiseEqual (const Scalar &s) const
const CwiseUnaryOp
< internal::scalar_inverse_op
< Scalar >, const Derived > 
cwiseInverse () const
const CwiseUnaryOp
< internal::scalar_sqrt_op
< Scalar >, const Derived > 
cwiseSqrt () const

Function Documentation

Returns:
an expression of the coefficient-wise absolute value of *this

Example:

MatrixXd m(2,3);
m << 2, -4, 6,   
     -5, 1, 0;
cout << m.cwiseAbs() << endl;

Output:

See also:
cwiseAbs2()

Definition at line 36 of file MatrixCwiseUnaryOps.h.

Returns:
an expression of the coefficient-wise squared absolute value of *this

Example:

MatrixXd m(2,3);
m << 2, -4, 6,   
     -5, 1, 0;
cout << m.cwiseAbs2() << endl;

Output:

See also:
cwiseAbs()

Definition at line 46 of file MatrixCwiseUnaryOps.h.

const CwiseUnaryOp<std::binder1st<std::equal_to<Scalar> >, const Derived> 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 78 of file MatrixCwiseUnaryOps.h.

const CwiseUnaryOp<internal::scalar_inverse_op<Scalar>, const Derived> cwiseInverse ( ) const [inline]
Returns:
an expression of the coefficient-wise inverse of *this.

Example:

MatrixXd m(2,3);
m << 2, 0.5, 1,   
     3, 0.25, 1;
cout << m.cwiseInverse() << endl;

Output:

See also:
cwiseProduct()

Definition at line 66 of file MatrixCwiseUnaryOps.h.

const CwiseUnaryOp<internal::scalar_sqrt_op<Scalar>, const Derived> cwiseSqrt ( ) const [inline]
Returns:
an expression of the coefficient-wise square root of *this.

Example:

Vector3d v(1,2,4);
cout << v.cwiseSqrt() << endl;

Output:

See also:
cwisePow(), cwiseSquare()

Definition at line 56 of file MatrixCwiseUnaryOps.h.



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