DistOperator
- class odl.DistOperator(*args, **kwargs)
Bases:
OperatorOperator taking the distance to a fixed space element.
Implements:
DistOperator(y)(x) == y.dist(x)
This is only applicable in metric spaces, i.e., spaces implementing a
distmethod.See Also
InnerProductOperator : Inner product with fixed space element. NormOperator : Vector space norm as an operator.
- __init__(vector)[source]
Initialize a new instance.
Parameters
- vector
LinearSpaceElement Point to calculate the distance to.
Examples
>>> r2 = odl.rn(2) >>> x = r2.element([1, 1]) >>> op = DistOperator(x) >>> op([4, 5]) 5.0
- vector