IndicatorBox
- class odl.functionals.default_functionals.IndicatorBox(*args, **kwargs)[source]
Bases:
FunctionalIndicator on some box shaped domain.
Notes
The indicator
with lower bound
and upper bound
is defined as:
- __init__(space, lower=None, upper=None)[source]
Initialize an instance.
Parameters
- space
LinearSpace Domain of the functional.
- lower
space.fieldelement orspaceelement-like, optional The lower bound. Default:
None, interpreted as -infinity- upper
space.fieldelement orspaceelement-like, optional The upper bound. Default:
None, interpreted as +infinity
Examples
>>> space = odl.rn(3) >>> func = IndicatorBox(space, 0, 2) >>> func([0, 1, 2]) # all points inside 0 >>> func([0, 1, 3]) # one point outside inf
- space