FunctionalQuotient

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

Bases: Functional

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

__init__(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.functionals.L2Norm(space)
>>> func2 = odl.functionals.ConstantFunctional(space, 5)
>>> prod = odl.functionals.FunctionalQuotient(func1, func2)
>>> prod([3, 4])  # expect sqrt(3**2 + 4**2) / 5 = 1
1.0