boofun.core.representations.registry
Functions
|
Retrieve and instantiate the strategy class for the given representation key. |
|
Register a strategy by supplying only the key methods. |
|
Decorator to register representation classes |
- boofun.core.representations.registry.get_strategy(rep_key: str) BooleanFunctionRepresentation[Any][source]
Retrieve and instantiate the strategy class for the given representation key.
- Parameters:
rep_key – Representation key (e.g., ‘truth_table’)
- Returns:
Instance of the strategy class
- Raises:
KeyError – If no strategy is registered for the key
- boofun.core.representations.registry.register_strategy(key: str) Any[source]
Decorator to register representation classes
- boofun.core.representations.registry.register_partial_strategy(key: str, *, evaluate: Callable[[...], Any], dump: Callable[[...], Any] | None = None, convert_from: Callable[[...], Any] | None = None, convert_to: Callable[[...], Any] | None = None, create_empty: Callable[[...], Any] | None = None, is_complete: Callable[[...], Any] | None = None, get_storage_requirements: Callable[[...], Any] | None = None, time_complexity_rank: Callable[[...], Any] | None = None) None[source]
Register a strategy by supplying only the key methods. Missing methods raise NotImplementedError by default.