InterpolationRegistry#
- class brainstate.nn.InterpolationRegistry[source]#
Registry for interpolation methods.
This class manages built-in and custom interpolation methods for the Delay system. Users can register custom interpolation functions and query available methods.
Examples
Register a custom interpolation method:
def my_interp(history, indices, float_idx, max_length): # Custom interpolation logic ... InterpolationRegistry.register('my_method', my_interp)
Use in Delay:
delay = Delay(target, time=5.0, interpolation='my_method')
- classmethod get(name)[source]#
Get an interpolation method by name.
- Parameters:
name (
str) – Name of the interpolation method- Returns:
The interpolation function
- Return type:
- Raises:
ValueError – If the interpolation method is not registered