Initialise and compute a new Hailstone Sequence.
The value to begin the hailstone sequence from.
Modulus used to devide n, iff n is equivalent to (0 mod P).
Factor by which to multiply n.
Value to add to the scaled value of n.
Maximum amount of times to iterate the function, if 1 is not reached.
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).
the hailstone sequence computed for the parameters provided.
FailedSaneParameterCheck Thrown if either P or a are 0.
Readonly
terminalA terminal condition that reflects the final state of the hailstone sequencing, whether than be that it succeeded at determining the stopping time, the total stopping time, found a cycle, or got stuck on zero (or surpassed the max total).
Readonly
terminalA status value that has different meanings depending on what the terminal condition was. If the sequence completed either via reaching the stopping or total stopping time, or getting stuck on zero, then this value is the stopping/terminal time. If the sequence got stuck on a cycle, then this value is the cycle length. If the sequencing passes the maximum stopping time then this is the value that was provided as that maximum.
Readonly
terminateThe stopping time terminal condition
Readonly
valuesThe set of values that comprise the hailstone sequence.
Generated using TypeDoc
Contains the results of computing a hailstone sequence.