My Project
stxxl::generate
Author
Roman Dementiev (2006)

The semantics of the algorithm are equivalent to the STL std::generate.

Prototype

template < typename ExtIterator, typename Generator >
void generate ( ExtIterator first,
ExtIterator last,
Generator generator,
int_type nbuffers
)

Description

Requirements on types

Preconditions

[first, last) is a valid range.

Complexity

Example

// Fill a vector with random numbers, using the
// standard C library function rand.
typedef stxxl::VECTOR_GENERATOR<int>::result vector_type;
vector_type V(some_size);
// use 20 buffer blocks
stxxl::generate(V.begin(), V.end(), rand, 20);