NumpyTensorSpaceCustomDist¶
- class odl.space.npy_tensors.NumpyTensorSpaceCustomDist(dist)[source]¶
- Bases: - CustomDist- Class for handling a user-specified distance in - TensorSpace.- Note that this removes - innerand- norm.- Attributes:
 - Methods - equiv(other)- Test if - otheris an equivalent weighting.- inner(x1, x2)- Inner product is not defined for custom distance. - norm(x)- Norm is not defined for custom distance. - __init__(dist)[source]¶
- Initialize a new instance. - Parameters:
- distcallable
- The distance function defining a metric on - TensorSpace. It must accept two- Tensorarguments, return a- floatand fulfill the following mathematical conditions for any three elements- x, y, z:- dist(x, y) >= 0
- dist(x, y) = 0if and only if- x = y
- dist(x, y) = dist(y, x)
- dist(x, y) <= dist(x, z) + dist(z, y)
 
 
- dist