mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add absolute_difference coefficient-wise binary Array function
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
6ff5a14091
commit
d5c665742b
@@ -75,6 +75,32 @@ max
|
||||
return (max)(Derived::PlainObject::Constant(rows(), cols(), other));
|
||||
}
|
||||
|
||||
/** \returns an expression of the coefficient-wise absdiff of \c *this and \a other
|
||||
*
|
||||
* Example: \include Cwise_absolute_difference.cpp
|
||||
* Output: \verbinclude Cwise_absolute_difference.out
|
||||
*
|
||||
* \sa absolute_difference()
|
||||
*/
|
||||
EIGEN_MAKE_CWISE_BINARY_OP(absolute_difference,absolute_difference)
|
||||
|
||||
/** \returns an expression of the coefficient-wise absolute_difference of \c *this and scalar \a other
|
||||
*
|
||||
* \sa absolute_difference()
|
||||
*/
|
||||
EIGEN_DEVICE_FUNC
|
||||
EIGEN_STRONG_INLINE const CwiseBinaryOp<internal::scalar_absolute_difference_op<Scalar,Scalar>, const Derived,
|
||||
const CwiseNullaryOp<internal::scalar_constant_op<Scalar>, PlainObject> >
|
||||
#ifdef EIGEN_PARSED_BY_DOXYGEN
|
||||
absolute_difference
|
||||
#else
|
||||
(absolute_difference)
|
||||
#endif
|
||||
(const Scalar &other) const
|
||||
{
|
||||
return (absolute_difference)(Derived::PlainObject::Constant(rows(), cols(), other));
|
||||
}
|
||||
|
||||
/** \returns an expression of the coefficient-wise power of \c *this to the given array of \a exponents.
|
||||
*
|
||||
* This function computes the coefficient-wise power.
|
||||
|
||||
Reference in New Issue
Block a user