diff options
| author | Tyge Løvset <[email protected]> | 2020-07-27 22:47:18 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-07-27 22:47:18 +0200 |
| commit | b5351558ac6d5f78750fe93ed9390fed5efa2ac4 (patch) | |
| tree | f3831a1bf270bff95a241f30aa69b475abce2fbf /examples/priority.c | |
| parent | f7369895d19abfe3e68d20bbf865d5749da3edf8 (diff) | |
| download | STC-modified-b5351558ac6d5f78750fe93ed9390fed5efa2ac4.tar.gz STC-modified-b5351558ac6d5f78750fe93ed9390fed5efa2ac4.zip | |
Changed crandom.h API
Diffstat (limited to 'examples/priority.c')
| -rw-r--r-- | examples/priority.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/priority.c b/examples/priority.c index 37e7be60..1aee8f58 100644 --- a/examples/priority.c +++ b/examples/priority.c @@ -9,12 +9,12 @@ declare_cvec(i, uint32_t); declare_cvec_priority_queue(i, >); // min-heap (increasing values)
int main() {
- crandom32_t pcg = crandom32_init(time(NULL));
+ crandom32_t pcg = crandom32_uniform_engine(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(&pcg));
+ cvecpq_i_push(&heap, crandom32_uniform_int(&pcg));
// Extract the hundred smallest.
for (int i=0; i<100; ++i) {
|
