summaryrefslogtreecommitdiffhomepage
path: root/examples/priority.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2020-07-29 16:02:04 +0200
committerTyge Løvset <[email protected]>2020-07-29 16:02:04 +0200
commit5dad12ce1a2dcd6bd9805c2f7eeb96f9dbe8aa48 (patch)
tree542b15e8dbf14a419128f9364c59768d073535c3 /examples/priority.c
parentb818bb967c6050d14a9c7058f02592a4ffeef9b4 (diff)
downloadSTC-modified-5dad12ce1a2dcd6bd9805c2f7eeb96f9dbe8aa48.tar.gz
STC-modified-5dad12ce1a2dcd6bd9805c2f7eeb96f9dbe8aa48.zip
Renamed crandom.h to crand.h + Changed API. Renamed coptget.h to copt.h.
Diffstat (limited to 'examples/priority.c')
-rw-r--r--examples/priority.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/priority.c b/examples/priority.c
index 1aee8f58..cf1c386c 100644
--- a/examples/priority.c
+++ b/examples/priority.c
@@ -3,18 +3,18 @@
#include <time.h>
#include <stc/cvecpq.h>
#include <stc/cmap.h>
-#include <stc/crandom.h>
+#include <stc/crand.h>
declare_cvec(i, uint32_t);
declare_cvec_priority_queue(i, >); // min-heap (increasing values)
int main() {
- crandom32_t pcg = crandom32_uniform_engine(time(NULL));
+ crand_eng32_t pcg = crand_eng32(time(NULL));
cvec_i heap = cvec_init;
// Push ten million random numbers to queue
for (int i=0; i<10000000; ++i)
- cvecpq_i_push(&heap, crandom32_uniform_int(&pcg));
+ cvecpq_i_push(&heap, crand_gen_i32(&pcg));
// Extract the hundred smallest.
for (int i=0; i<100; ++i) {