polymerist.genutils.sequences.discernment.enumeration

Front-facing solver facade for the DISCERNMENT Problem

Classes

DISCERNMENTSolver

Encapsulation class for solving generalized ransom-note index enumeration problems for arbitrary words, bins, and solving algorithms

Module Contents

class polymerist.genutils.sequences.discernment.enumeration.DISCERNMENTSolver(symbol_inventory: polymerist.genutils.sequences.discernment.inventory.SymbolInventory[polymerist.genutils.sequences.discernment.inventory.T, polymerist.genutils.sequences.discernment.inventory.L] | Sequence[Iterable[polymerist.genutils.sequences.discernment.inventory.T]] | Mapping[polymerist.genutils.sequences.discernment.inventory.L, Sequence[Iterable[polymerist.genutils.sequences.discernment.inventory.T]]], strategy: polymerist.genutils.sequences.discernment.strategies.DISCERNMENTStrategy = DISCERNMENTStrategyStack())[source]

Encapsulation class for solving generalized ransom-note index enumeration problems for arbitrary words, bins, and solving algorithms

strategy
property symbol_inventory: polymerist.genutils.sequences.discernment.inventory.SymbolInventory[polymerist.genutils.sequences.discernment.inventory.T, polymerist.genutils.sequences.discernment.inventory.L]

Cast symbol inventory as copy to avoid mutation during partial traversals (i.e. peek at first item)

enumerate_choices(word: Sequence[polymerist.genutils.sequences.discernment.inventory.T], ignore_multiplicities: bool = False, unique_bins: bool = False) Generator[polymerist.genutils.sequences.discernment.inventory.L, None, None][source]

Enumerate all possible choices using specified solution strategy

choice_solutions_exist(word: Sequence[polymerist.genutils.sequences.discernment.inventory.T], ignore_multiplicities: bool = False, unique_bins: bool = False) bool[source]

Precheck to see if a solution exists without attemting full enumeration