ProductSpaceConstWeighting¶
-
class
odl.space.pspace.
ProductSpaceConstWeighting
(constant, exponent=2.0)[source]¶ Bases:
odl.space.weighting.ConstWeighting
Constant weighting for
ProductSpace
.- Attributes
Methods
dist
(self, x1, x2)Calculate the constant-weighted distance between two elements.
equiv
(self, other)Test if other is an equivalent weighting.
inner
(self, x1, x2)Calculate the constant-weighted inner product of two elements.
norm
(self, x)Calculate the constant-weighted norm of an element.
-
__init__
(self, constant, exponent=2.0)[source]¶ Initialize a new instance.
- Parameters
- constantpositive float
Weighting constant of the inner product
- exponentpositive float, optional
Exponent of the norm. For values other than 2.0, no inner product is defined.
Notes
For exponent 2.0, a new weighted inner product with constant is defined as
For other exponents, only
norm
and`dist
are defined. In the case of exponentinf
, the weighted norm isotherwise it is
Note that this definition does not fulfill the limit property in , i.e.,
unless . The reason for this choice is that the alternative with the limit property consists in ignoring the weight altogether.
The constant must be positive, otherwise it does not define an inner product or norm, respectively.