CustomInner

class odl.space.weighting.CustomInner(inner, impl)[source]

Bases: odl.space.weighting.Weighting

Class for handling a user-specified inner product.

Attributes
exponent

Exponent of this weighting.

impl

Implementation backend of this weighting.

inner

Custom inner product of this instance..

repr_part

String usable in a space’s __repr__ method.

Methods

dist(self, x1, x2)

Calculate the distance between two elements.

equiv(self, other)

Test if other is an equivalent weighting.

norm(self, x)

Calculate the norm of an element.

__init__(self, inner, impl)[source]

Initialize a new instance.

Parameters
innercallable

The inner product implementation. It must accept two LinearSpaceElement arguments, return an element from their space’s field (real or complex number) and satisfy the following conditions for all space elements x, y, z and scalars s:

  • <x, y> = conj(<y, x>)

  • <s*x + y, z> = s * <x, z> + <y, z>

  • <x, x> = 0 if and only if x = 0

implstring

Specifier for the implementation backend.