summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/priorityqueues
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-21 00:37:28 +0200
committertylov <[email protected]>2023-07-21 00:37:28 +0200
commit2d67f4040f6eecd41f1b864b43c62823ed75aff0 (patch)
tree084ce603dc4edfa1ccad3aabab5b671a817bc67e /misc/examples/priorityqueues
parent900295256d825fc323149cd223c49787f32a3696 (diff)
downloadSTC-modified-2d67f4040f6eecd41f1b864b43c62823ed75aff0.tar.gz
STC-modified-2d67f4040f6eecd41f1b864b43c62823ed75aff0.zip
Renamed badly abbreviated names in crand.h.
Moved coroutine.h from algo subfolder to stc. Updated coroutine.h and docs.
Diffstat (limited to 'misc/examples/priorityqueues')
-rw-r--r--misc/examples/priorityqueues/priority.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/priorityqueues/priority.c b/misc/examples/priorityqueues/priority.c
index bf2e188a..18684e73 100644
--- a/misc/examples/priorityqueues/priority.c
+++ b/misc/examples/priorityqueues/priority.c
@@ -11,21 +11,21 @@
int main(void) {
intptr_t N = 10000000;
crand_t rng = crand_init((uint64_t)time(NULL));
- crand_unif_t dist = crand_unif_init(0, N * 10);
+ crand_uniform_t dist = crand_uniform_init(0, N * 10);
cpque_i heap = {0};
// Push ten million random numbers to priority queue
printf("Push %" c_ZI " numbers\n", N);
c_forrange (N)
- cpque_i_push(&heap, crand_unif(&rng, &dist));
+ cpque_i_push(&heap, crand_uniform(&rng, &dist));
// push some negative numbers too.
c_forlist (i, int, {-231, -32, -873, -4, -343})
cpque_i_push(&heap, *i.ref);
c_forrange (N)
- cpque_i_push(&heap, crand_unif(&rng, &dist));
+ cpque_i_push(&heap, crand_uniform(&rng, &dist));
puts("Extract the hundred smallest.");
c_forrange (100) {