diff options
| author | Tyge Løvset <[email protected]> | 2023-03-30 17:59:08 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-03-30 17:59:08 +0200 |
| commit | a0a290645828c88597efce80f6b0f5a958cefa89 (patch) | |
| tree | 53dc78071653b515a06a60baf4488a1b6d080b32 /docs/cpque_api.md | |
| parent | 32df5677c9906661e91aad294e45a258e2eaab18 (diff) | |
| download | STC-modified-a0a290645828c88597efce80f6b0f5a958cefa89.tar.gz STC-modified-a0a290645828c88597efce80f6b0f5a958cefa89.zip | |
Added crand.h - Alternative API to crandom.h, which will be deprecated.
Diffstat (limited to 'docs/cpque_api.md')
| -rw-r--r-- | docs/cpque_api.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/cpque_api.md b/docs/cpque_api.md index 1396dc1f..962ee162 100644 --- a/docs/cpque_api.md +++ b/docs/cpque_api.md @@ -60,7 +60,7 @@ i_val cpque_X_value_clone(i_val value); ## Example ```c -#include <stc/crandom.h> +#include <stc/crand.h> #include <stdio.h> #define i_val int64_t @@ -71,15 +71,15 @@ i_val cpque_X_value_clone(i_val value); int main() { intptr_t N = 10000000; - stc64_t rng = stc64_new(1234); - stc64_uniform_t dist = stc64_uniform_new(0, N * 10); + crand_t rng = crand_init(1234); + crand_unif_t dist = crand_unif_init(0, N * 10); // Define heap cpque_i heap = {0}; // Push ten million random numbers to priority queue. c_forrange (N) - cpque_i_push(&heap, stc64_uniform(&rng, &dist)); + cpque_i_push(&heap, crand_unif(&rng, &dist)); // Add some negative ones. int nums[] = {-231, -32, -873, -4, -343}; |
