Module: Collatz::SequenceState

Defined in:
lib/collatz/utilities.rb

Overview

SequenceState for Cycle Control: Descriptive flags to indicate when some event occurs in the hailstone sequences or tree graph reversal, when set to verbose, or stopping time check.

Constant Summary collapse

STOPPING_TIME =

A Hailstone sequence state that indicates the stopping time, a value less than the initial, has been reached.

"STOPPING_TIME"
TOTAL_STOPPING_TIME =

A Hailstone sequence state that indicates the total stopping time, a value of 1, has been reached.

"TOTAL_STOPPING_TIME"
CYCLE_INIT =

A Hailstone and TreeGraph sequence state that indicates the first occurence of a value that subsequently forms a cycle.

"CYCLE_INIT"
CYCLE_LENGTH =

A Hailstone and TreeGraph sequence state that indicates the last occurence of a value that has already formed a cycle.

"CYCLE_LENGTH"
MAX_STOP_OUT_OF_BOUNDS =

A Hailstone and TreeGraph sequence state that indicates the sequence or traversal has executed some imposed ‘maximum’ amount of times.

"MAX_STOP_OUT_OF_BOUNDS"
ZERO_STOP =

A Hailstone sequence state that indicates the sequence terminated by reaching “0”, a special type of “stopping time”.

"ZERO_STOP"