ProductSpaceCustomNorm

class odl.space.pspace.ProductSpaceCustomNorm(norm)[source]

Bases: odl.space.weighting.CustomNorm

Class for handling a user-specified norm on ProductSpace.

Note that this removes inner.

Attributes
exponent

Exponent of this weighting.

impl

Implementation backend of this weighting.

norm

Custom norm of this instance..

repr_part

Return a 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.

inner(self, x1, x2)

Inner product is not defined for custom distance.

__init__(self, norm)[source]

Initialize a new instance.

Parameters
normcallable

The norm implementation. It must accept a ProductSpaceElement argument, return a float and satisfy the following conditions for all space elements x, y and scalars s:

  • ||x|| >= 0

  • ||x|| = 0 if and only if x = 0

  • ||s * x|| = |s| * ||x||

  • ||x + y|| <= ||x|| + ||y||