diff options
| author | Tyge Løvset <[email protected]> | 2020-12-16 10:58:04 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2020-12-16 10:58:04 +0100 |
| commit | a147a1be246472d079f72fc22e065080d1588e29 (patch) | |
| tree | d01c8965999f86cd46a51cf6ac3e2920adb238a0 /docs/cpqueue_api.md | |
| parent | 12d7c1b3ca437af8734acc8e7cbfdba08b8c36df (diff) | |
| download | STC-modified-a147a1be246472d079f72fc22e065080d1588e29.tar.gz STC-modified-a147a1be246472d079f72fc22e065080d1588e29.zip | |
Reverted back API to easier naming scheme of crandom.h types and methods.
Highly optimized generation of unbiased uniform bounded random numbers. Only 33% overhead.
Diffstat (limited to 'docs/cpqueue_api.md')
| -rw-r--r-- | docs/cpqueue_api.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/cpqueue_api.md b/docs/cpqueue_api.md index 1e92277a..ac33e68f 100644 --- a/docs/cpqueue_api.md +++ b/docs/cpqueue_api.md @@ -63,13 +63,13 @@ using_cpqueue(i, cvec_i, >); // adaptor type, '>' = min-heap int main() { size_t N = 10000000; - cstc64_t rng = cstc64_init(1234); - cstc64_uniform_t dist = cstc64_uniform_init(0, N * 10); + crand_t rng = crand_init(1234); + crand_uniform_t dist = crand_uniform_init(0, N * 10); cpqueue_i heap = cpqueue_i_init(); // Push ten million random numbers to priority queue, plus some negative ones. c_forrange (N) - cpqueue_i_push(&heap, cstc64_uniform(&rng, &dist)); + cpqueue_i_push(&heap, crand_uniform(&rng, &dist)); c_push_items(&heap, cpqueue_i, {-231, -32, -873, -4, -343}); // Extract and display the fifty smallest. |
