|
24 | 24 | import arcsine = require( '@stdlib/random/strided/arcsine' ); |
25 | 25 | import beta = require( '@stdlib/random/strided/beta' ); |
26 | 26 | import betaprime = require( '@stdlib/random/strided/betaprime' ); |
| 27 | +import cosine = require( '@stdlib/random/strided/cosine' ); |
27 | 28 | import discreteUniform = require( '@stdlib/random/strided/discrete-uniform' ); |
28 | 29 | import exponential = require( '@stdlib/random/strided/exponential' ); |
| 30 | +import gamma = require( '@stdlib/random/strided/gamma' ); |
| 31 | +import invgamma = require( '@stdlib/random/strided/invgamma' ); |
29 | 32 | import lognormal = require( '@stdlib/random/strided/lognormal' ); |
30 | 33 | import minstd = require( '@stdlib/random/strided/minstd' ); |
| 34 | +import minstdShuffle = require( '@stdlib/random/strided/minstd-shuffle' ); |
31 | 35 | import mt19937 = require( '@stdlib/random/strided/mt19937' ); |
32 | 36 | import normal = require( '@stdlib/random/strided/normal' ); |
33 | 37 | import randu = require( '@stdlib/random/strided/randu' ); |
@@ -145,6 +149,42 @@ interface Namespace { |
145 | 149 | */ |
146 | 150 | betaprime: typeof betaprime; |
147 | 151 |
|
| 152 | + /** |
| 153 | + * Fills a strided array with pseudorandom numbers drawn from a raised cosine distribution. |
| 154 | + * |
| 155 | + * @param N - number of indexed elements |
| 156 | + * @param mu - mean |
| 157 | + * @param sm - `mu` stride length |
| 158 | + * @param s - scale parameter |
| 159 | + * @param ss - `s` stride length |
| 160 | + * @param out - output array |
| 161 | + * @param so - `out` stride length |
| 162 | + * @param options - function options |
| 163 | + * @throws must provide valid distribution parameters |
| 164 | + * @throws must provide valid options |
| 165 | + * @throws must provide a valid state |
| 166 | + * @returns output array |
| 167 | + * |
| 168 | + * @example |
| 169 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 170 | + * |
| 171 | + * // Create an array: |
| 172 | + * var out = new Float64Array( 10 ); |
| 173 | + * |
| 174 | + * // Fill the array with pseudorandom numbers: |
| 175 | + * ns.cosine( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 ); |
| 176 | + * |
| 177 | + * @example |
| 178 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 179 | + * |
| 180 | + * // Create an array: |
| 181 | + * var out = new Float64Array( 10 ); |
| 182 | + * |
| 183 | + * // Fill the array with pseudorandom numbers: |
| 184 | + * ns.cosine.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 ); |
| 185 | + */ |
| 186 | + cosine: typeof cosine; |
| 187 | + |
148 | 188 | /** |
149 | 189 | * Fills a strided array with pseudorandom numbers drawn from a discrete uniform distribution. |
150 | 190 | * |
@@ -215,6 +255,78 @@ interface Namespace { |
215 | 255 | */ |
216 | 256 | exponential: typeof exponential; |
217 | 257 |
|
| 258 | + /** |
| 259 | + * Fills a strided array with pseudorandom numbers drawn from a gamma distribution. |
| 260 | + * |
| 261 | + * @param N - number of indexed elements |
| 262 | + * @param alpha - shape parameter |
| 263 | + * @param sa - `alpha` stride length |
| 264 | + * @param beta - rate parameter |
| 265 | + * @param sb - `beta` stride length |
| 266 | + * @param out - output array |
| 267 | + * @param so - `out` stride length |
| 268 | + * @param options - function options |
| 269 | + * @throws must provide valid distribution parameters |
| 270 | + * @throws must provide valid options |
| 271 | + * @throws must provide a valid state |
| 272 | + * @returns output array |
| 273 | + * |
| 274 | + * @example |
| 275 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 276 | + * |
| 277 | + * // Create an array: |
| 278 | + * var out = new Float64Array( 10 ); |
| 279 | + * |
| 280 | + * // Fill the array with pseudorandom numbers: |
| 281 | + * ns.gamma( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 ); |
| 282 | + * |
| 283 | + * @example |
| 284 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 285 | + * |
| 286 | + * // Create an array: |
| 287 | + * var out = new Float64Array( 10 ); |
| 288 | + * |
| 289 | + * // Fill the array with pseudorandom numbers: |
| 290 | + * ns.gamma.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 ); |
| 291 | + */ |
| 292 | + gamma: typeof gamma; |
| 293 | + |
| 294 | + /** |
| 295 | + * Fills a strided array with pseudorandom numbers drawn from an inverse gamma distribution. |
| 296 | + * |
| 297 | + * @param N - number of indexed elements |
| 298 | + * @param alpha - shape parameter |
| 299 | + * @param sa - `alpha` stride length |
| 300 | + * @param beta - scale parameter |
| 301 | + * @param sb - `beta` stride length |
| 302 | + * @param out - output array |
| 303 | + * @param so - `out` stride length |
| 304 | + * @param options - function options |
| 305 | + * @throws must provide valid distribution parameters |
| 306 | + * @throws must provide valid options |
| 307 | + * @throws must provide a valid state |
| 308 | + * @returns output array |
| 309 | + * |
| 310 | + * @example |
| 311 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 312 | + * |
| 313 | + * // Create an array: |
| 314 | + * var out = new Float64Array( 10 ); |
| 315 | + * |
| 316 | + * // Fill the array with pseudorandom numbers: |
| 317 | + * ns.invgamma( out.length, [ 2.0 ], 0, [ 5.0 ], 0, out, 1 ); |
| 318 | + * |
| 319 | + * @example |
| 320 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 321 | + * |
| 322 | + * // Create an array: |
| 323 | + * var out = new Float64Array( 10 ); |
| 324 | + * |
| 325 | + * // Fill the array with pseudorandom numbers: |
| 326 | + * ns.invgamma.ndarray( out.length, [ 2.0 ], 0, 0, [ 5.0 ], 0, 0, out, 1, 0 ); |
| 327 | + */ |
| 328 | + invgamma: typeof invgamma; |
| 329 | + |
218 | 330 | /** |
219 | 331 | * Fills a strided array with pseudorandom numbers drawn from a lognormal distribution. |
220 | 332 | * |
@@ -300,6 +412,55 @@ interface Namespace { |
300 | 412 | */ |
301 | 413 | minstd: typeof minstd; |
302 | 414 |
|
| 415 | + /** |
| 416 | + * Fills a strided array with pseudorandom integers on the interval `[1, 2147483646]`. |
| 417 | + * |
| 418 | + * @param N - number of indexed elements |
| 419 | + * @param out - output array |
| 420 | + * @param so - `out` stride length |
| 421 | + * @param options - function options |
| 422 | + * @throws must provide valid options |
| 423 | + * @throws must provide a valid state |
| 424 | + * @returns output array |
| 425 | + * |
| 426 | + * @example |
| 427 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 428 | + * |
| 429 | + * // Create an array: |
| 430 | + * var out = new Float64Array( 10 ); |
| 431 | + * |
| 432 | + * // Fill the array with pseudorandom numbers: |
| 433 | + * ns.minstdShuffle( out.length, out, 1 ); |
| 434 | + * |
| 435 | + * @example |
| 436 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 437 | + * |
| 438 | + * // Create an array: |
| 439 | + * var out = new Float64Array( 10 ); |
| 440 | + * |
| 441 | + * // Fill the array with pseudorandom numbers: |
| 442 | + * ns.minstdShuffle.ndarray( out.length, out, 1, 0 ); |
| 443 | + * |
| 444 | + * @example |
| 445 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 446 | + * |
| 447 | + * // Create an array: |
| 448 | + * var out = new Float64Array( 10 ); |
| 449 | + * |
| 450 | + * // Fill the array with pseudorandom numbers: |
| 451 | + * ns.minstdShuffle.normalized( out.length, out, 1 ); |
| 452 | + * |
| 453 | + * @example |
| 454 | + * var Float64Array = require( `@stdlib/array/float64` ); |
| 455 | + * |
| 456 | + * // Create an array: |
| 457 | + * var out = new Float64Array( 10 ); |
| 458 | + * |
| 459 | + * // Fill the array with pseudorandom numbers: |
| 460 | + * ns.minstdShuffle.normalized.ndarray( out.length, out, 1, 0 ); |
| 461 | + */ |
| 462 | + minstdShuffle: typeof minstdShuffle; |
| 463 | + |
303 | 464 | /** |
304 | 465 | * Fills a strided array with pseudorandom integers on the interval `[0, 4294967295]`. |
305 | 466 | * |
|
0 commit comments