DistOperator¶
- class odl.operator.default_ops.DistOperator(*args, **kwargs)[source]¶
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
InnerProductOperatorInner product with fixed space element.
NormOperatorVector space norm as an operator.
- Attributes:
adjointAdjoint of this operator (abstract).
domainSet of objects on which this operator can be evaluated.
inverseReturn the operator inverse.
is_functionalTrueif this operator's range is aField.is_linearTrueif this operator is linear.rangeSet in which the result of an evaluation of this operator lies.
vectorElement to which to take the distance.
Methods
__call__(x[, out])Return
self(x[, out, **kwargs]).derivative(point)The derivative operator.
norm([estimate])Return the operator norm of this operator.
- __init__(vector)[source]¶
Initialize a new instance.
- Parameters:
- vector
LinearSpaceElement Point to calculate the distance to.
- vector
Examples
>>> r2 = odl.rn(2) >>> x = r2.element([1, 1]) >>> op = DistOperator(x) >>> op([4, 5]) 5.0