thrust::binary_negate
Defined in thrust/functional.h
-
template<typename Predicate>
struct binary_negate binary_negate
is a function object adaptor: it is an Adaptable Binary Predicate that represents the logical negation of some other Adaptable Binary Predicate. That is: iff
is an object of classbinary_negate<AdaptablePredicate>
, then there exists an objectpred
of classAdaptableBinaryPredicate
such thatf(x,y)
always returns the same value as!pred(x,y)
. There is rarely any reason to construct abinary_negate
directly; it is almost always easier to use the helper function not2.deprecated [Since 2.6]
Public Types
-
using result_type = bool
Public Functions
-
inline explicit binary_negate(Predicate p)
Constructor takes a
Predicate
object to negate.- Parameters
p – The
Predicate
object to negate.
-
inline bool operator()(const first_argument_type &x, const second_argument_type &y)
Function call operator. The return value is
!pred(x,y)
.
-
using result_type = bool