FunctionalQuotient

class odl.solvers.functional.functional.FunctionalQuotient(*args, **kwargs)[source]

Bases: odl.solvers.functional.functional.Functional

Quotient p(x) = f(x) / g(x) of two functionals f and g.

Attributes
adjoint

Adjoint of this operator (abstract).

convex_conj

Convex conjugate functional of the functional.

dividend

The dividend of the quotient.

divisor

The divisor of the quotient.

domain

Set of objects on which this operator can be evaluated.

grad_lipschitz

Lipschitz constant for the gradient of the functional.

gradient

Gradient operator of the functional.

inverse

Return the operator inverse.

is_functional

True if this operator’s range is a Field.

is_linear

True if this operator is linear.

proximal

Proximal factory of the functional.

range

Set in which the result of an evaluation of this operator lies.

Methods

_call(self, x)

Apply the functional to the given point.

bregman(self, point, subgrad)

Return the Bregman distance functional.

derivative(self, point)

Return the derivative operator in the given point.

norm(self[, estimate])

Return the operator norm of this operator.

translated(self, shift)

Return a translation of the functional.

__init__(self, dividend, divisor)[source]

Initialize a new instance.

Parameters
dividend, divisorFunctional

Functionals in the quotient. Need to have matching domains.

Examples

Construct the functional || . ||_2 / 5

>>> space = odl.rn(2)
>>> func1 = odl.solvers.L2Norm(space)
>>> func2 = odl.solvers.ConstantFunctional(space, 5)
>>> prod = odl.solvers.FunctionalQuotient(func1, func2)
>>> prod([3, 4])  # expect sqrt(3**2 + 4**2) / 5 = 1
1.0