thrust
Public Types | Public Member Functions | List of all members
thrust::minimum< T > Struct Template Reference

#include <thrust/functional.h>

Public Types

typedef T first_argument_type
 The type of the function object's first argument.
 
typedef T second_argument_type
 The type of the function object's second argument.
 
typedef T result_type
 The type of the function object's result;.
 

Public Member Functions

__thrust_exec_check_disable__ __host__ __device__ T operator() (const T &lhs, const T &rhs) const
 

Detailed Description

template<typename T>
struct thrust::minimum< T >

minimum is a function object that takes two arguments and returns the lesser of the two. Specifically, it is an Adaptable Binary Function. If f is an object of class minimum<T> and x and y are objects of class T f(x,y) returns x if x < y and y, otherwise.

Template Parameters
Tis a model of LessThan Comparable.

The following code snippet demonstrates that minimum returns its lesser argument.

#include <assert.h>
...
int x = 137;
int y = -137;
assert(y == mn(x,y));
See also
maximum
max
binary_function

The documentation for this struct was generated from the following file: