Bases: Registry
Storage for (p, state) -> float | DistanceResult measures.
The function reads off a single state’s value from a single
distribution.
-
register(name, supports_alphabet=<function _any_alphabet>)[source]
Decorator for registering a StateAwareMeasure.
- Parameters:
name (str) – The name of the measure.
supports_alphabet (Callable[[tuple[int, ...]], bool]) – Callable (alphabet_sizes) -> bool
indicating whether the measure handles the given node
cardinalities. Defaults to _any_alphabet.
- Return type:
Callable[[Callable[[…], float]], Callable[[…], float]]