Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
* // returns <Float64Array>
*
* var bool = ( out === x );
* // returns true

Check failure on line 196 in lib/node_modules/@stdlib/random/array/pareto-type1/docs/types/index.d.ts

View workflow job for this annotation

GitHub Actions / Lint Changed Files

Displayed return value is `true`, but expected `false` instead
*/
assign( alpha: number, beta: number, out: RandomArray ): RandomArray;

Expand All @@ -207,6 +207,8 @@
* @param alpha - shape parameter
* @param beta - scale parameter
* @param options - function options
* @throws `alpha` must be a positive number
* @throws `beta` must be a positive number
* @throws must provide a valid state
* @returns function for creating arrays
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ interface Random extends PRNG {
* @param k - shape parameter
* @param lambda - scale parameter
* @param options - function options
* @throws `k` must be a positive number
* @throws `lambda` must be a positive number
* @throws must provide a valid state
* @returns function for creating arrays
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ interface Random extends PRNG {
*
* - When provided `mu` and `s`, the returned PRNG returns random variates drawn from the specified distribution.
*
* @param mu - mean parameter
* @param mu - mean
* @param s - scale parameter
* @param options - function options
* @param options.prng - pseudorandom number generator which generates uniformly distributed pseudorandom numbers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ interface Random extends PRNG {
*
* @example
* var v = frechet( 1.0, 1.0, 0.8 );
* // returns NaN
* // returns <number>
*/
( alpha: number, s: number, m: number ): number;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ interface Random extends PRNG {
*
* - When provided `mu` and `beta`, the returned PRNG returns random variates drawn from the specified distribution.
*
* @param mu - mean parameter
* @param mu - mean
* @param beta - scale parameter
* @param options - function options
* @param options.prng - pseudorandom number generator which generates uniformly distributed pseudorandom numbers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ interface Random extends PRNG {
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
* @param options.copy - boolean indicating whether to copy a provided pseudorandom number generator state (default: true)
* @throws `alpha` must be a positive number
* @throws `beta` must be a positive number
* @throws must provide a valid state
* @returns pseudorandom number generator
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ interface Random extends PRNG {
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
* @param options.copy - boolean indicating whether to copy a provided pseudorandom number generator state (default: true)
* @throws `a` must be a positive number
* @throws `b` must be a positive number
* @throws must provide a valid state
* @returns pseudorandom number generator
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ interface Random extends PRNG {
*
* - When provided `mu` and `s`, the returned PRNG returns random variates drawn from the specified distribution.
*
* @param mu - mean parameter
* @param mu - mean
* @param s - scale parameter
* @param options - function options
* @param options.prng - pseudorandom number generator which generates uniformly distributed pseudorandom numbers
Expand Down Expand Up @@ -194,7 +194,7 @@ interface Random extends PRNG {
* @returns pseudorandom number generator
*
* @example
* var mylogistic = factory();
* var mylogistic = logistic.factory();
*
* var v = mylogistic( 0.0, 1.0 );
* // returns <number>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ interface Random extends PRNG {
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
* @param options.copy - boolean indicating whether to copy a provided pseudorandom number generator state (default: true)
* @throws `lambda` must be a positive number
* @throws must provide a valid state
* @returns pseudorandom number generator
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,16 @@ interface Random extends PRNG {
(): number;

/**
* Returns a pseudorandom number generator for generating exponential distributed random numbers.
* Returns a pseudorandom number generator for generating standard normally distributed random numbers.
*
* @param options - function options
* @param options.name - name of pseudorandom number generator (default: 'improved-ziggurat')
* @param options.prng - pseudorandom number generator which generates uniformly distributed pseudorandom numbers
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
* @param options.copy - boolean indicating whether to copy a provided pseudorandom number generator state (default: true)
* @throws must provide valid options
* @throws must provide the name of a supported pseudorandom number generator
* @throws must provide a valid state
* @returns pseudorandom number generator
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ interface Random extends PRNG {
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
* @param options.copy - boolean indicating whether to copy a provided pseudorandom number generator state (default: true)
* @throws `sigma` must be a positive number
* @throws must provide a valid state
* @returns pseudorandom number generator
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ interface Random extends PRNG {
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
* @param options.copy - boolean indicating whether to copy a provided pseudorandom number generator state (default: true)
* @throws `v` must be a positive number
* @throws must provide a valid state
* @returns pseudorandom number generator
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ interface TernaryFunction extends PRNG {
*/
interface Random extends PRNG {
/**
* Returns pseudorandom number drawn from a triangular distribution.
* Returns a pseudorandom number drawn from a triangular distribution.
*
* ## Notes
*
Expand Down Expand Up @@ -212,7 +212,7 @@ interface Random extends PRNG {
}

/**
* Returns pseudorandom number drawn from a triangular distribution.
* Returns a pseudorandom number drawn from a triangular distribution.
*
* ## Notes
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ interface Random extends PRNG {
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
* @param options.copy - boolean indicating whether to copy a provided pseudorandom number generator state (default: true)
* @throws `k` must be a positive number
* @throws `lambda` must be a positive number
* @throws must provide a valid state
* @returns pseudorandom number generator
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface Options {
state?: random.PRNGStateMT19937;

/**
* Specifies whether to copy a provided pseudorandom number generator state (default: true).
* Specifies whether to copy a provided pseudorandom number generator state (default: `true`).
*/
copy?: boolean;

Expand All @@ -54,7 +54,7 @@ interface Options {
}

/**
* Interface for iterators of pseudorandom numbers drawn from a continuous uniform distribution.
* Interface for iterators of pseudorandom numbers drawn from a discrete uniform distribution.
*/
interface Iterator<T> extends TypedIterator<T> {
/**
Expand Down Expand Up @@ -103,6 +103,7 @@ interface Iterator<T> extends TypedIterator<T> {
* @throws `b` must be an integer
* @throws `a` must be less than or equal to `b`
* @throws must provide valid options
* @throws must provide a valid state
* @returns iterator
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface Iterator<T> extends TypedIterator<T> {
* Returns an iterator for generating pseudorandom numbers drawn from an Erlang distribution.
*
* @param k - shape parameter
* @param lambda - rate parameter
* @param lambda - rate parameter
* @param options - function options
* @throws `k` must be a positive integer
* @throws `lambda` must be a positive number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface Iterator<T> extends TypedIterator<T> {
* Returns an iterator for generating pseudorandom numbers drawn from a Fréchet distribution.
*
* @param alpha - shape parameter
* @param s - rate parameter
* @param s - scale parameter
* @param m - location parameter
* @param options - function options
* @throws `alpha` must be a positive number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ interface Options {
}

/**
* Interface for iterators of pseudorandom numbers drawn from a logistic distribution.
* Interface for iterators of pseudorandom numbers drawn from a hypergeometric distribution.
*/
interface Iterator<T> extends TypedIterator<T> {
/**
Expand Down Expand Up @@ -106,6 +106,7 @@ interface Iterator<T> extends TypedIterator<T> {
* @throws `n` must be less than or equal to `N`
* @throws `K` must be less than or equal to `N`
* @throws must provide valid options
* @throws must provide a valid state
* @returns iterator
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ interface Options {
}

/**
* Interface for iterators of pseudorandom numbers having integer values.
* Interface for iterators of pseudorandom numbers drawn from a standard normal distribution.
*/
interface Iterator<T> extends TypedIterator<T> {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ interface Options {
}

/**
* Interface for iterators of pseudorandom numbers drawn from a logistic distribution.
* Interface for iterators of pseudorandom numbers drawn from a triangular distribution.
*/
interface Iterator<T> extends TypedIterator<T> {
/**
Expand Down Expand Up @@ -102,6 +102,7 @@ interface Iterator<T> extends TypedIterator<T> {
* @param options.iter - number of iterations
* @throws arguments must satisfy `a <= c <= b`
* @throws must provide valid options
* @throws must provide a valid state
* @returns iterator
*
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ interface Iterator<T> extends TypedIterator<T> {
/**
* Returns an iterator for generating pseudorandom numbers drawn from a Weibull distribution.
*
* @param k - scale parameter
* @param lambda - shape parameter
* @param k - shape parameter
* @param lambda - scale parameter
* @param options - function options
* @throws `k` must be a positive number
* @throws `lambda` must be a positive number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ interface Constructor {
/**
* Returns an "objectMode" readable stream for generating a stream of pseudorandom numbers drawn from a Fréchet distribution.
*
*
* @param alpha - shape parameter
* @param s - scale parameter
* @param m - location parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ interface Constructor {
/**
* Returns an "objectMode" readable stream for generating a stream of pseudorandom numbers drawn from a hypergeometric distribution.
*
*
* @param N - population size
* @param K - subpopulation size
* @param n - number of draws
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ interface Constructor {
* @param options.siter - number of iterations after which to emit the PRNG state
* @throws must provide valid options
* @throws must provide a valid state
* @returns Stream instance
* @returns stream instance
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
Expand Down Expand Up @@ -252,7 +252,7 @@ interface Constructor {
* @param options.siter - number of iterations after which to emit the PRNG state
* @throws must provide valid options
* @throws must provide a valid state
* @returns Stream instance
* @returns stream instance
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
Expand Down Expand Up @@ -320,7 +320,7 @@ interface Constructor {
* @param options.siter - number of iterations after which to emit the PRNG state
* @throws must provide valid options
* @throws must provide a valid state
* @returns Stream instance
* @returns stream instance
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ declare class RandomStream extends Readable {
private _i: number;

/**
* Pseudorandom number generator for generating standard normally distributed pseudorandom numbers.
* Pseudorandom number generator for generating pseudorandom numbers via a linear congruential pseudorandom number generator (LCG) whose output is shuffled.
*/
private readonly _prng: random.PRNG;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ declare class RandomStream extends Readable {
private _i: number;

/**
* Pseudorandom number generator for generating standard normally distributed pseudorandom numbers.
* Pseudorandom number generator for generating pseudorandom numbers via a linear congruential pseudorandom number generator (LCG) based on Park and Miller.
*/
private readonly _prng: random.PRNG;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ declare class RandomStream extends Readable {
private _i: number;

/**
* Pseudorandom number generator for generating standard normally distributed pseudorandom numbers.
* Pseudorandom number generator for generating pseudorandom numbers via a 32-bit Mersenne Twister pseudorandom number generator.
*/
private readonly _prng: random.PRNG;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ declare class RandomStream extends Readable {
private _i: number;

/**
* Pseudorandom number generator for generating standard normally distributed pseudorandom numbers.
* Pseudorandom number generator for generating pseudorandom numbers having integer values.
*/
private readonly _prng: random.PRNG;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ interface Constructor {
* @param options.highWaterMark - specifies the maximum number of bytes to store in an internal buffer before ceasing to generate additional pseudorandom numbers
* @param options.sep - separator used to join streamed data (default: '\n')
* @param options.iter - number of iterations
* @param options.name='improved-ziggurat' - name of a supported pseudorandom number generator (PRNG), which will serve as the underlying source of pseudorandom numbers
* @param options.name - name of a supported pseudorandom number generator (PRNG), which will serve as the underlying source of pseudorandom numbers (default: 'improved-ziggurat')
* @param options.prng - pseudorandom number generator which generates uniformly distributed pseudorandom numbers
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ declare class RandomStream extends Readable {
private _i: number;

/**
* Pseudorandom number generator for generating standard normally distributed pseudorandom numbers.
* Pseudorandom number generator for generating uniformly distributed pseudorandom numbers between `0` and `1`.
*/
private readonly _prng: random.PRNG;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface Random extends PRNG {
*
* @param N - number of indexed elements
* @param p - success probability
* @param sp - `p` strided length
* @param sp - `p` stride length
* @param out - output array
* @param so - `out` stride length
* @returns output array
Expand All @@ -113,7 +113,7 @@ interface Random extends PRNG {
*
* @param N - number of indexed elements
* @param p - success probability
* @param sp - `p` strided length
* @param sp - `p` stride length
* @param op - starting index for `p`
* @param out - output array
* @param so - `out` stride length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface Random extends PRNG {
*
* @param N - number of indexed elements
* @param k - degrees of freedom
* @param sk - `k` strided length
* @param sk - `k` stride length
* @param out - output array
* @param so - `out` stride length
* @returns output array
Expand All @@ -113,7 +113,7 @@ interface Random extends PRNG {
*
* @param N - number of indexed elements
* @param k - degrees of freedom
* @param sk - `k` strided length
* @param sk - `k` stride length
* @param ok - starting index for `k`
* @param out - output array
* @param so - `out` stride length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ interface Random extends PRNG {
*
* @param N - number of indexed elements
* @param k - degrees of freedom
* @param sk - `k` strided length
* @param sk - `k` stride length
* @param out - output array
* @param so - `out` stride length
* @returns output array
Expand All @@ -113,7 +113,7 @@ interface Random extends PRNG {
*
* @param N - number of indexed elements
* @param k - degrees of freedom
* @param sk - `k` strided length
* @param sk - `k` stride length
* @param ok - starting index for `k`
* @param out - output array
* @param so - `out` stride length
Expand Down
Loading
Loading