24 #ifndef __INDEX_VECTOR_HPP__ 25 #define __INDEX_VECTOR_HPP__ 41 CUnique(
int initial = 1) {current=initial-1;}
42 int operator()() {
return ++current;}
53 std::vector<int> arr(n);
54 generate (arr.begin(), arr.end(), UniqueNumber);
67 std::vector<int> arr(n);
68 generate (arr.begin(), arr.end(), UniqueNumber);
80 generate (arr.begin(), arr.end(), UniqueNumber);
Namespace of the library interface.
Simple class to generate sequences of unique numbers.
std::vector< int > return_index_vector(size_t n)
Generates a vector of indexes (1..n)
void modify_index_vector(std::vector< int > &arr)
Modify a vector of indexes (0..n)