ConstWeighting¶
- class odl.space.weighting.ConstWeighting(const, impl, exponent=2.0)[source]¶
Bases:
WeightingWeighting of a space by a constant.
- Attributes:
Methods
dist(x1, x2)Calculate the distance between two elements.
equiv(other)Test if other is an equivalent weighting.
inner(x1, x2)Return the inner product of two elements.
norm(x)Calculate the norm of an element.
- __init__(const, impl, exponent=2.0)[source]¶
Initialize a new instance.
- Parameters:
- constantpositive float
Weighting constant of the inner product.
- implstring
Specifier for the implementation backend.
- exponentpositive float, optional
Exponent of the norm. For values other than 2.0, the inner product is not defined.