tfmri.math.indicator_box
tfmri.math.indicator_box¶
- indicator_box(x, lower_bound=- 1.0, upper_bound=1.0, name=None)[source]¶
Indicator function of a box.
Returns
0
ifx
is in the box,inf
otherwise.The box of radius \(r\) is defined as the set of points of \({R}^{n}\) whose components are within the range \([l, u]\).
\[\mathcal{C} = \left\{x \in \mathbb{R}^{n} : l \leq x_i \leq u, \forall i = 1, \dots, n \right\}\]- Parameters
- Returns
A tf.Tensor of shape
[...]
and dtype equal tox.dtype.real_dtype
.- Raises
ValueError – If inputs are invalid.