ConstWeighting

class odl.space.weighting.ConstWeighting(const, impl, exponent=2.0)[source]

Bases: odl.space.weighting.Weighting

Weighting of a space by a constant.

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 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.

__init__(self, 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.