LinearSpace

class odl.set.space.LinearSpace(field)[source]

Bases: odl.set.sets.Set

Abstract linear vector space.

Its elements are represented as instances of the LinearSpaceElement class.

Attributes
element_type

Type of elements of this space (LinearSpaceElement).

examples

Example elements zero and one (if available).

field

Scalar field of numbers for this vector space.

Methods

_dist(self, x1, x2)

Return the distance between x1 and x2.

_inner(self, x1, x2)

Return the inner product of x1 and x2.

_lincomb(self, a, x1, b, x2, out)

Implement out[:] = a * x1 + b * x2.

_multiply(self, x1, x2, out)

Implement the pointwise multiplication out[:] = x1 * x2.

_norm(self, x)

Return the norm of x.

contains_all(self, other)

Test if all elements in other are contained in this set.

contains_set(self, other)

Test if other is a subset of this set.

dist(self, x1, x2)

Return the distance between x1 and x2.

divide(self, x1, x2[, out])

Return the pointwise quotient of x1 and x2

element(self[, inp])

Create a LinearSpaceElement from inp or from scratch.

inner(self, x1, x2)

Return the inner product of x1 and x2.

lincomb(self, a, x1[, b, x2, out])

Implement out[:] = a * x1 + b * x2.

multiply(self, x1, x2[, out])

Return the pointwise product of x1 and x2.

norm(self, x)

Return the norm of x.

one(self)

Return the one (multiplicative unit) element of this space.

zero(self)

Return the zero (additive unit) element of this space.

__init__(self, field)[source]

Initialize a new instance.

This method should be called by all inheriting methods so that the field property of the space is properly set.

Parameters
fieldField or None

Scalar field of numbers for this space.