FunctionalProduct
- class odl.functionals.functional.FunctionalProduct(*args, **kwargs)[source]
Bases:
Functional,OperatorPointwiseProductProduct
p(x) = f(x) * g(x)of two functionalsfandg.- __init__(left, right)[source]
Initialize a new instance.
Parameters
- left, right
Functional 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
- left, right