Weighting¶
-
class
odl.space.weighting.
Weighting
(impl, exponent=2.0)[source]¶ Bases:
object
Abstract 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 theLinearSpace
instance where these functions are being used.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)Return the inner product of two elements.
norm
(self, x)Calculate the norm of an element.