CompoundTriePostprocessor

class CompoundTriePostprocessor[source]

Functor to sequentially apply multiple trie postprocessors.

Allows for the combination and sequential application of multiple trie postprocessors.

__init__(postprocessors: Iterable[TriePostprocessorBase]) None[source]

Initialize functor instance.

Parameters

postprocessorstyping.Iterable[TriePostprocessorBase]

The sequence of postprocess functors to be applied.

Methods

__init__(postprocessors: Iterable[TriePostprocessorBase]) None[source]

Initialize functor instance.

Parameters

postprocessorstyping.Iterable[TriePostprocessorBase]

The sequence of postprocess functors to be applied.

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

Apply stored postprocessors in sequence.

Parameters

trieTrieInnerNode

The input trie to be postprocessed.

p_differentia_collisionfloat

Probability of a randomly-generated differentia matching an existing differentia.

Forwarded to the postprocess functors.

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 after applying all stored postprocessors.