ProductSpaceConstWeighting

class odl.space.pspace.ProductSpaceConstWeighting(constant, exponent=2.0)[source]

Bases: odl.space.weighting.ConstWeighting

Constant weighting for ProductSpace.

Attributes
const

Weighting constant of this inner product.

exponent

Exponent of this weighting.

impl

Implementation backend of this weighting.

repr_part

String usable in a space’s __repr__ method.

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 c is defined as

    \langle x, y \rangle_c = c\, \langle x, y \rangle.

    For other exponents, only norm and `dist are defined. In the case of exponent inf, the weighted norm is

    \|x\|_{c,\infty} = c\, \|x\|_\infty,

    otherwise it is

    \|x\|_{c,p} = c^{1/p} \, \|x\|_p.

  • Note that this definition does not fulfill the limit property in p, i.e.,

    \|x\|_{c,p} \not\to \|x\|_{c,\infty}
\quad \text{for } p \to \infty

    unless c = 1. 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.