This repository has been archived by the owner on Jul 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathindex.d.ts
40 lines (34 loc) · 1.96 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Type definitions for D3JS d3-random module v1.0.1
// Project: https://github.com/d3/d3-random/
// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Returns a function for generating random numbers with a uniform distribution).
* The minimum allowed value of a returned number is min, and the maximum is max.
* If min is not specified, it defaults to 0; if max is not specified, it defaults to 1.
*/
export function randomUniform(min?: number, max?: number): () => number;
/**
* Returns a function for generating random numbers with a normal (Gaussian) distribution.
* The expected value of the generated numbers is mu, with the given standard deviation sigma.
* If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1.
*/
export function randomNormal(mu?: number, sigma?: number): () => number;
/**
* Returns a function for generating random numbers with a log-normal distribution. The expected value of the random variable’s natural logrithm is mu,
* with the given standard deviation sigma. If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1.
*/
export function randomLogNormal(mu?: number, sigma?: number): () => number;
/**
* Returns a function for generating random numbers with a Bates distribution with n independent variables.
*/
export function randomBates(n: number): () => number;
/**
* Returns a function for generating random numbers with an Irwin–Hall distribution with n independent variables.
*/
export function randomIrwinHall(n: number): () => number;
/**
* Returns a function for generating random numbers with an exponential distribution with the rate lambda;
* equivalent to time between events in a Poisson process with a mean of 1 / lambda.
*/
export function randomExponential(lambda: number): () => number;