Weighting¶
- class odl.space.weighting.Weighting(impl, exponent=2.0)[source]¶
Bases:
objectAbstract base class for weighting of finite-dimensional spaces.
This class and its subclasses serve as a simple means to evaluate and compare weighted inner products, norms and metrics semantically rather than by identity on a pure function level.
The functions are implemented similarly to
Operator, but without extra type checks of input parameters - this is done in the callers of theLinearSpaceinstance where these functions are being used.Methods
dist(x1, x2)Calculate the distance between two elements.
equiv(other)Test if
otheris an equivalent weighting.inner(x1, x2)Return the inner product of two elements.
norm(x)Calculate the norm of an element.