Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dpsynth/discrete_mechanisms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
from dpsynth.discrete_mechanisms.direct import DirectConfig
from dpsynth.discrete_mechanisms.independent import IndependentConfig
from dpsynth.discrete_mechanisms.mst import MSTConfig
from dpsynth.discrete_mechanisms.swift import SWIFTConfig
3 changes: 3 additions & 0 deletions dpsynth/discrete_mechanisms/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from . import direct
from . import independent
from . import mst
from . import swift


class DiscreteMechanismConfig(Protocol):
Expand Down Expand Up @@ -65,6 +66,8 @@ def run_mechanism(
run_mechanism_fn = direct.run_mechanism
elif isinstance(config, independent.IndependentConfig):
run_mechanism_fn = independent.run_mechanism
elif isinstance(config, independent.SWIFTConfig):
run_mechanism_fn = swift.run_mechanism
else:
raise ValueError(f'Unknown mechanism: {type(config)}')

Expand Down