severalgos/3np1 mod problem C++
June 21, 2020
|
Function definitions. More...
Go to the source code of this file.
Namespaces | |
lib_3np1_mod | |
Typedefs | |
typedef uint64_t | lib_3np1_mod::value_type |
typedef value_type(* | lib_3np1_mod::operation_type) (value_type) |
typedef value_type(* | lib_3np1_mod::operation_mask_type) (value_type, value_type) |
Functions | |
value_type | lib_3np1_mod::C (value_type n) |
Collatz C function. More... | |
value_type | lib_3np1_mod::C_mask (value_type n, value_type mask) |
Return \(C(n) = \frac{n}{2}\) if n even, \(C(n) = (3n + 1) \& mask\) if n odd. More... | |
value_type | lib_3np1_mod::m2 (value_type n) |
\(m_2\) function. More... | |
value_type | lib_3np1_mod::F (value_type n) |
F odd function. More... | |
value_type | lib_3np1_mod::F_mask (value_type n, value_type mask) |
Return \(F(0) = 0\) \(F(n) = \frac{n}{2^k}\) if n even \(F(n) = \frac{(3n + 1) \& mask}{2^k}\) if n odd which k as large as possible = \(m_2(...)\). More... | |
std::set< value_type > | lib_3np1_mod::search_mask_exceptions (value_type mask) |
Calculate and return all null and odd exceptions for the 3n + 1 problem with modulo (mask + 1). More... | |
std::set< value_type > | lib_3np1_mod::search_mask_exceptions_32 () |
Calculate and return all null and odd exceptions for the 3n + 1 problem with modulo \(2^32\). More... | |
std::set< value_type > | lib_3np1_mod::search_mask_exceptions_64 () |
Calculate and return all null and odd exceptions for the 3n + 1 problem with modulo \(2^32\). More... | |
std::vector< value_type > | lib_3np1_mod::start_path_mask (value_type n, operation_mask_type operation_mask, value_type mask) |
Given operation, return the start of path from n to the first value < n or to the first repeated value. More... | |
value_type | lib_3np1_mod::T (value_type n) |
Terras T function. More... | |
value_type | lib_3np1_mod::T_mask (value_type n, value_type mask) |
Return \(T(n) = \frac{n}{2}\) if n even \(T(n) = \frac{(3n + 1) \& mask}{2}\) if n odd. More... | |
Function definitions.
Definition in file lib_3np1_mod.hpp.