ProductSpaceCustomNorm¶
- class odl.space.pspace.ProductSpaceCustomNorm(norm)[source]¶
Bases:
CustomNormClass for handling a user-specified norm on
ProductSpace.Note that this removes
inner.- Attributes:
Methods
dist(x1, x2)Calculate the distance between two elements.
equiv(other)Test if
otheris an equivalent weighting.inner(x1, x2)Inner product is not defined for custom distance.
- __init__(norm)[source]¶
Initialize a new instance.
- Parameters:
- normcallable
The norm implementation. It must accept a
ProductSpaceElementargument, return a float and satisfy the following conditions for all space elementsx, yand scalarss:||x|| >= 0||x|| = 0if and only ifx = 0||s * x|| = |s| * ||x||||x + y|| <= ||x|| + ||y||