Interface CollatzHailstoneParameters

Parameterised inputs

Remarks

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

interface CollatzHailstoneParameters {
    P?: bigint;
    a?: bigint;
    b?: bigint;
    initialValue: bigint;
    maxTotalStoppingTime?: 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

maxTotalStoppingTime?: number

Maximum amount of times to iterate the function, if 1 is not reached.

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