brainmass.additive_coupling#
- brainmass.additive_coupling(delayed_x, conn, k=1.0)#
Additive coupling kernel (function form).
Computes, for each target unit i over the last axis, the additive term
current_i = k * sum_j conn[i, j] * x_{i, j}
with full support for leading batch/time dimensions and unit-safe algebra.
- Parameters:
delayed_x (
Callable|Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Zero-arg callable returning the source signal with shape(..., N_out, N_in)or flattened(..., N_out*N_in). Typically aPrefetch.conn (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Connection weights with shape(N_out, N_in).k (
Array|ndarray|bool|number|bool|int|float|complex|Quantity) – Global coupling strength. Scalar or broadcastable to(..., N_out).
- Returns:
Coupling output with shape
(..., N_out). Units are preserved when inputs are Quantity.- Return type:
ArrayLike
- Raises:
ValueError – If shapes are incompatible with the expected conventions.