- 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
ExtIterator
is a model of External Random Access Iterator.
ExtIterator
is mutable.
Generator
is a model of a STL Generator.
Generator's
result type is convertible to ExtIterator's
value type.
Preconditions
[first, last) is a valid range.
Complexity
- Internal work is linear.
- External work: close to
I/Os (write-only).
Example
typedef stxxl::VECTOR_GENERATOR<int>::result vector_type;
vector_type V(some_size);
stxxl::generate(V.begin(), V.end(), rand, 20);