BroadcastOperator

class odl.operator.pspace_ops.BroadcastOperator(*args, **kwargs)[source]

Bases: odl.operator.operator.Operator

Broadcast argument to set of operators.

An argument is broadcast by evaluating several operators in the same point:

BroadcastOperator(op1, op2)(x) = [op1(x), op2(x)]

See also

ProductSpaceOperator

More general case, used as backend.

ReductionOperator

Calculates sum of operator results.

DiagonalOperator

Case where each operator should have its own argument.

Attributes
adjoint

Adjoint of this operator.

domain

Set of objects on which this operator can be evaluated.

inverse

Return the operator inverse.

is_functional

True if this operator’s range is a Field.

is_linear

True if this operator is linear.

operators

Tuple of sub-operators that comprise self.

prod_op

ProductSpaceOperator implementation.

range

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

size

Total number of sub-operators.

Methods

_call(self, x[, out])

Evaluate all operators in x and broadcast.

derivative(self, x)

Derivative of the broadcast operator.

norm(self[, estimate])

Return the operator norm of this operator.

__init__(self, \*operators)[source]

Initialize a new instance

Parameters
operator1,…,operatorNOperator or int

The individual operators that should be evaluated. Can also be given as operator, n with n integer, in which case operator is repeated n times.

Examples

Initialize an operator:

>>> I = odl.IdentityOperator(odl.rn(3))
>>> op = BroadcastOperator(I, 2 * I)
>>> op.domain
rn(3)
>>> op.range
ProductSpace(rn(3), 2)

Evaluate the operator:

>>> x = [1, 2, 3]
>>> op(x)
ProductSpace(rn(3), 2).element([
    [ 1.,  2.,  3.],
    [ 2.,  4.,  6.]
])

Can also initialize by calling an operator repeatedly:

>>> I = odl.IdentityOperator(odl.rn(3))
>>> op = BroadcastOperator(I, 2)
>>> op.operators
(IdentityOperator(rn(3)), IdentityOperator(rn(3)))