e3x.nn.functions.cutoff.smooth_cutoff
- e3x.nn.functions.cutoff.smooth_cutoff(x, cutoff=1.0)[source]
Smooth cutoff function.
Computes the function
\[\begin{split}\mathrm{smooth\_cutoff}(x) = \begin{cases} \exp\left(1-\frac{1}{1-\left(\frac{x}{c}\right)^2}\right), & x < c\\ 0, & x \ge c \end{cases}\end{split}\]which is zero beyond \(c\) =
cutoffand is infinitely differentiable.- Parameters:
x (
<class 'Float[Array, '...']'>) – Input array.cutoff (
Union[Float[Array, ''], float], default:1.0) – Cutoff value (must be larger than 0).
- Return type:
- Returns:
The function value.
- Raises:
ValueError – If
cutoffis smaller or equal to 0.