diff options
| author | Tyge Løvset <[email protected]> | 2020-12-28 18:18:48 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-12-28 18:18:48 +0100 |
| commit | 74a75b3a8d155ea155358674d3bf8251658183a5 (patch) | |
| tree | 19886986b9ce6943b826311cda40f67ebc8dd7b1 /examples/priority.c | |
| parent | 83b7be31a1d0fc0be4e013dbfc97bb6cdc3600db (diff) | |
| download | STC-modified-74a75b3a8d155ea155358674d3bf8251658183a5.tar.gz STC-modified-74a75b3a8d155ea155358674d3bf8251658183a5.zip | |
Reverted crand.h API back to rename crand_* to stc64_*, and crand_next() -> stc64_rand().
Diffstat (limited to 'examples/priority.c')
| -rw-r--r-- | examples/priority.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/priority.c b/examples/priority.c index 4eb762ec..4eceb29f 100644 --- a/examples/priority.c +++ b/examples/priority.c @@ -11,19 +11,19 @@ using_cpque(i, cvec_i, >); // min-heap (increasing values) int main() {
size_t N = 10000000;
- crand_t rng = crand_init(time(NULL));
- crand_uniform_t dist = crand_uniform_init(0, N * 10);
+ stc64_t rng = stc64_init(time(NULL));
+ stc64_uniform_t dist = stc64_uniform_init(0, N * 10);
cpque_i heap = cpque_i_init();
// Push ten million random numbers to priority queue
c_forrange (N)
- cpque_i_push(&heap, crand_uniform(&rng, &dist));
+ cpque_i_push(&heap, stc64_uniform(&rng, &dist));
// push some negative numbers too.
c_push_items(&heap, cpque_i, {-231, -32, -873, -4, -343});
c_forrange (N)
- cpque_i_push(&heap, crand_uniform(&rng, &dist));
+ cpque_i_push(&heap, stc64_uniform(&rng, &dist));
// Extract the hundred smallest.
|
