These members are not defined in the Adaptable Unary Function requirements, but are specific to
Member | Description |
---|---|
subtractive_rng(unsigned int seed) | The constructor. Creates a |
subtractive_rng() | The default constructor. Creates a |
void initialize(unsigned int seed) | Re-initializes the internal state of the |
[1] See section 3.6 of Knuth for an implementation of the subtractive method in FORTRAN. Section 3.2.2 of Knuth analyzes this class of algorithms. (D. E. Knuth,
[2] Note that the sequence produced by a
Random Number Generator
Function object adaptors
binder1st<AdaptableBinaryFunction>
Categories: functors, adaptors
Component type: type
The easiest way to create a
Finds the first nonzero element in a list.
list<int> L;
…
list<int>::iterator first_nonzero = find_if(L.begin(), L.end(), bind1st(not_equal_to<int>(), 0));
assert(first_nonzero == L.end() || *first_nonzero != 0);
Defined in the standard header functional, and in the nonstandard backward-compatibility header function.h.
Parameter | Description |
---|---|
AdaptableBinaryFunction | The type of the binary function whose first argument is being bound to a constant. |
Adaptable Unary Function
unary_function<AdaptableBinaryFunction::second_argument_type, AdaptableBinaryFunction::result_type>
Member | Where defined | Description |
---|---|---|
argument_type | Adaptable Unary Function | The type of the function object's argument, which is |