e3x.nn.functions.window.triangular_window
- e3x.nn.functions.window.triangular_window(x, num, limit=1.0)[source]
Triangular window basis functions.
Computes the basis functions
\[\mathrm{triangular\_window}_k(x) = \max\left( \min\left(\frac{K}{l}x - k - 1, \frac{K}{l}x + k + 1\right),0\right)\]where \(k=0 \dots K-1\) with \(K\) =
numand \(l\) =limit. Plot for \(K = 5\) and \(l = 1\):- Parameters:
x (
<class 'Float[Array, '...']'>) – Input array.num (
int) – Number of basis functions \(K\).limit (
Union[Float[Array, ''], float], default:1.0) – Basis functions are distributed between 0 andlimit.
- Return type:
- Returns:
Value of all basis functions for all values in
x. The output shape follows the input, with an additional dimension of sizenumappended.