|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Public Member Functions | |
| DataGenerator (unsigned seed) | |
| void | random (DynArray< int > &arr, size_t n) |
| Uniformly distributed random integers. | |
| void | sorted_asc (DynArray< int > &arr, size_t n) |
| Already sorted in ascending order. | |
| void | sorted_desc (DynArray< int > &arr, size_t n) |
| Sorted in descending order. | |
| void | nearly_sorted (DynArray< int > &arr, size_t n) |
| Nearly sorted: 5% of elements are swapped. | |
| void | few_unique (DynArray< int > &arr, size_t n) |
| Few unique values (high repetition) | |
| void | sawtooth (DynArray< int > &arr, size_t n) |
| Sawtooth pattern: multiple ascending runs. | |
Private Attributes | |
| mt19937 | rng |
Definition at line 236 of file sort_benchmark.C.
|
inlineexplicit |
Definition at line 241 of file sort_benchmark.C.
Few unique values (high repetition)
Definition at line 283 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), Aleph::DynArray< T >::empty(), Aleph::maps(), and rng.
Referenced by run_benchmarks().
Nearly sorted: 5% of elements are swapped.
Definition at line 269 of file sort_benchmark.C.
References Aleph::maps(), rng, sorted_asc(), and Aleph::swap().
Referenced by run_benchmarks().
Uniformly distributed random integers.
Definition at line 244 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), Aleph::DynArray< T >::empty(), Aleph::maps(), and rng.
Referenced by run_benchmarks().
Sawtooth pattern: multiple ascending runs.
Definition at line 292 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), Aleph::DynArray< T >::empty(), Aleph::maps(), and max().
Referenced by run_benchmarks().
Already sorted in ascending order.
Definition at line 253 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), and Aleph::DynArray< T >::empty().
Referenced by nearly_sorted(), and run_benchmarks().
Sorted in descending order.
Definition at line 261 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), and Aleph::DynArray< T >::empty().
Referenced by run_benchmarks().
|
private |
Definition at line 238 of file sort_benchmark.C.
Referenced by few_unique(), nearly_sorted(), and random().