FunctionalProduct

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

Bases: Functional, OperatorPointwiseProduct

Product p(x) = f(x) * g(x) of two functionals f and g.

__init__(left, right)[source]

Initialize a new instance.

Parameters

left, rightFunctional

Functionals in the product. Need to have matching domains.

Examples

Construct the functional || . ||_2^2 * 3

>>> space = odl.rn(2)
>>> func1 = odl.functionals.L2NormSquared(space)
>>> func2 = odl.functionals.ConstantFunctional(space, 3)
>>> prod = odl.functionals.FunctionalProduct(func1, func2)
>>> prod([2, 3])  # expect (2**2 + 3**2) * 3 = 39
39.0