Interface CollatzStoppingTimeParameters

Parameterised inputs

Remarks

Allows non-default (P,a,b); and other options.

interface CollatzStoppingTimeParameters {
    P?: bigint;
    a?: bigint;
    b?: bigint;
    initialValue: bigint;
    maxStoppingTime?: number;
    totalStoppingTime?: boolean;
}

Properties

P?: bigint

Modulus used to devide n, iff n is equivalent to (0 mod P).

Default Value

2n
a?: bigint

Factor by which to multiply n.

Default Value

3n
b?: bigint

Value to add to the scaled value of n.

Default Value

1n
initialValue: bigint

The value on which to perform the Collatz-esque function

maxStoppingTime?: number

Maximum amount of times to iterate the function, if the stopping time is not reached. IF the maxStoppingTime is reached, the function will return null.

Default Value

1000
totalStoppingTime?: boolean

Whether or not to execute until the "total" stopping time (number of iterations to obtain 1) rather than the regular stopping time (number of iterations to reach a value less than the initial value).

Default Value

true

Generated using TypeDoc