helper_omegas module¶
- itrails.helper_omegas.combine_by_omega(by_omega_1, by_omega_2)[source]¶
Function that updates an existing subpath based on the omega values, keeps the original value if it is not -1 (already a subpath), adds the new value if it is -1 (crates a subpath).
- Parameters:
by_omega_1 (Tuple of int64.) – Original subpath.
by_omega_2 (Tuple of int64.) – New subpath.
- Returns:
Updated subpath.
- Return type:
Tuple of int64.
- itrails.helper_omegas.remove_absorbing_indices(omega_dict, absorbing_key, species, tuple_omegas=UniTuple(int64, 2))[source]¶
Function that removes the absorbing states from the omega dictionary.
- Parameters:
omega_dict (Numba typed dictionary.) – Dictionary of omega indices (key) and vector of booleans where each key has the states (value).
absorbing_key (Tuple of int64.) – Key of the absorbing states.
species (int64.) – Number of species.
tuple_omegas (Numba type, optional.) – Type of omega, defaults to nb.types.Tuple((nb.types.int64, nb.types.int64))
- Returns:
Dictionary without the absorbing states.
- Return type:
Numba typed dictionary.