random
Direct randomness. operation selects the primitive: bytes -- raw CSPRNG bytes. params: {count<=4096, encoding: hex|base64} int -- unbiased integers in [min,max] via rejection sampling. params: {min, max, count<=10000} shuffle -- Fisher-Yates; permutation[i] is the original index now at position i. params: {items, return_permutation} choose -- k items, weighted or not, with/without replacement. params: {items, k, weights, replacement} sample -- named distributions: uniform, normal, lognormal, exponential, triangular, beta. params: {distribution, params, n<=10000} constrained -- records with independently sampled attributes + chi-squared conformance proof. params: {attributes: {attr: {value: prop}}, n} seed (top level) makes any operation reproducible.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | optional seed for a reproducible draw | |
| params | No | operation-specific arguments | |
| operation | Yes |