DistOperator

class odl.operator.default_ops.DistOperator(*args, **kwargs)[source]

Bases: Operator

Operator 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 dist method.

See also

InnerProductOperator

Inner product with fixed space element.

NormOperator

Vector space norm as an operator.

Attributes:
adjoint

Adjoint of this operator (abstract).

domain

Set of objects on which this operator can be evaluated.

inverse

Return the operator inverse.

is_functional

True if this operator's range is a Field.

is_linear

True if this operator is linear.

range

Set in which the result of an evaluation of this operator lies.

vector

Element 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:
vectorLinearSpaceElement

Point to calculate the distance to.

Examples

>>> r2 = odl.rn(2)
>>> x = r2.element([1, 1])
>>> op = DistOperator(x)
>>> op([4, 5])
5.0