AssignOriginTimeNodeRankTriePostprocessor

class AssignOriginTimeNodeRankTriePostprocessor[source]

Functor to assign trie nodes’ rank as their the origin time.

__init__(assigned_property: str = 'origin_time') None[source]

Initialize functor instance.

Parameters

assigned_propertystr, default “origin_time”

The property name for the assigned origin time.

Methods

__init__(assigned_property: str = 'origin_time') None[source]

Initialize functor instance.

Parameters

assigned_propertystr, default “origin_time”

The property name for the assigned origin time.

__call__(trie: ~hstrat.phylogenetic_inference.tree._impl._TrieInnerNode.TrieInnerNode, p_differentia_collision: float, mutate: bool = False, progress_wrap: ~typing.Callable = <function AssignOriginTimeNodeRankTriePostprocessor.<lambda>>) TrieInnerNode[source]

Assign origin times to trie nodes.

Parameters

trieTrieInnerNode

The input trie to be postprocessed.

p_differentia_collisionfloat

Probability of a randomly-generated differentia matching an existing differentia. Not used in the current implementation.

mutatebool, default False

Are side effects on the input argument trie allowed?

progress_wraptyping.Callable, optional

Pass tqdm or equivalent to report progress.

Returns

TrieInnerNode

The postprocessed trie with assigned origin times.