Functions
Generator Algorithms

Functions

template<typename RandomAccessIterator >
void ustl::random_shuffle (RandomAccessIterator first, RandomAccessIterator last)
 
template<typename BidirectionalIterator >
bool ustl::next_permutation (BidirectionalIterator first, BidirectionalIterator last)
 Creates the next lexicographical permutation of [first,last). Returns false if no further permutations can be created.
 
template<typename BidirectionalIterator >
bool ustl::prev_permutation (BidirectionalIterator first, BidirectionalIterator last)
 Creates the previous lexicographical permutation of [first,last). Returns false if no further permutations can be created.
 
template<typename ForwardIterator , typename T >
void ustl::fill (ForwardIterator first, ForwardIterator last, const T &value)
 
template<typename OutputIterator , typename T >
OutputIterator ustl::fill_n (OutputIterator first, size_t count, const T &value)
 
template<typename Container , typename T >
void ustl::fill (Container &ctr, const T &value)
 
template<typename Container , typename Generator >
void ustl::generate (Container &ctr, Generator gen)
 
template<typename Container >
void ustl::random_shuffle (Container &ctr)
 

Detailed Description

Algorithms for generating data.

Function Documentation

template<typename ForwardIterator , typename T >
void ustl::fill ( ForwardIterator  first,
ForwardIterator  last,
const T &  value 
)
inline

Fill assigns the value value to every element in the range [first, last). That is, for every iterator i in [first, last), it performs the assignment *i = value.

Referenced by ustl::vector< T >::assign(), ustl::fill(), and ustl::istringstream::getline().

template<typename Container , typename T >
void ustl::fill ( Container &  ctr,
const T &  value 
)
inline

Fill assigns the value value to every element in the range [first, last). That is, for every iterator i in [first, last), it performs the assignment *i = value.

References ustl::fill().

template<typename OutputIterator , typename T >
OutputIterator ustl::fill_n ( OutputIterator  first,
size_t  count,
const T &  value 
)
inline

Fill_n assigns the value value to every element in the range [first, first+count). That is, for every iterator i in [first, first+count), it performs the assignment *i = value. The return value is first + count.

References ustl::count().

Referenced by ustl::string::append(), ustl::memlink::fill(), ustl::string::insert(), ustl::load_identity(), ustl::string::resize(), and ustl::string::string().

template<typename Container , typename Generator >
void ustl::generate ( Container &  ctr,
Generator  gen 
)
inline

Generate assigns the result of invoking gen, a function object that takes no arguments, to each element in the range [first, last).

References ustl::generate().

template<typename Container >
void ustl::random_shuffle ( Container &  ctr)
inline

Randomly permute the elements of the container.

References ustl::random_shuffle().

template<typename RandomAccessIterator >
void ustl::random_shuffle ( RandomAccessIterator  first,
RandomAccessIterator  last 
)

Randomly permute the elements of the container.

References ustl::distance(), and ustl::iter_swap().

Referenced by ustl::random_shuffle().


Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10