|
Aleph-w 7.10.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 250 of file sort_benchmark.C.
|
inlineexplicit |
Definition at line 255 of file sort_benchmark.C.
|
inline |
Few unique values (high repetition)
Definition at line 297 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), Aleph::DynArray< T >::empty(), and rng.
Referenced by run_benchmarks().
|
inline |
Nearly sorted: 5% of elements are swapped.
Definition at line 283 of file sort_benchmark.C.
References rng, sorted_asc(), and Aleph::swap().
Referenced by run_benchmarks().
|
inline |
Uniformly distributed random integers.
Definition at line 258 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), Aleph::DynArray< T >::empty(), and rng.
Referenced by demonstrate_complexity(), and run_benchmarks().
|
inline |
Sawtooth pattern: multiple ascending runs.
Definition at line 306 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), Aleph::DynArray< T >::empty(), and max().
Referenced by run_benchmarks().
|
inline |
Already sorted in ascending order.
Definition at line 267 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), and Aleph::DynArray< T >::empty().
Referenced by nearly_sorted(), and run_benchmarks().
|
inline |
Sorted in descending order.
Definition at line 275 of file sort_benchmark.C.
References Aleph::DynArray< T >::append(), and Aleph::DynArray< T >::empty().
Referenced by run_benchmarks().
|
private |
Definition at line 252 of file sort_benchmark.C.
Referenced by few_unique(), nearly_sorted(), and random().