ScalingFunctional

class odl.functionals.default_functionals.ScalingFunctional(*args, **kwargs)[source]

Bases: Functional, ScalingOperator

Functional that scales the input argument by a value.

Since the range of a functional is always a field, the domain of this functional is also a field, i.e. real or complex numbers.

__init__(field, scale)[source]

Initialize a new instance.

Parameters

fieldField

Domain of the functional.

scaleelement in domain

The constant value to scale by.

Examples

>>> field = odl.RealNumbers()
>>> func = ScalingFunctional(field, 3)
>>> func(5)
15.0