Functions

Functional interface. Different functions for combining operators and convenience functions. Like with linalg, these functions have dispatch rules and should be used in favor of the LinearOperator constructors when possible.

cola.fns.lazify(A)[source]

Convert an array to a linear operator if it is not already one.

cola.fns.densify(A)[source]

Convert a linear operator to a dense array if it is not already one.

cola.fns.no_dispatch(A)[source]

This function allows the user to circumvent dispatch functionality that might be triggered based on the type of the operator. For example, if we have D = A @ B + a * C where A, B, C are linear operators and a is a scalar then to avoid triggering sum, product and scalar product dispatch rules we can wrap D as D = cola.no_dispatch(D).

cola.fns.kron(A, B)[source]

Kronecker product of two linear operators.

cola.fns.kron(A: cola.ops.operator_base.LinearOperator, B: cola.ops.operator_base.LinearOperator)[source]
cola.fns.kron(A: cola.ops.operators.Diagonal, B: cola.ops.operators.Diagonal)[source]
cola.fns.kron(A: cola.ops.operators.Kronecker, B: cola.ops.operator_base.LinearOperator)[source]
cola.fns.kron(A: cola.ops.operator_base.LinearOperator, B: cola.ops.operators.Kronecker)[source]
cola.fns.kronsum(A, B)[source]
cola.fns.kronsum(A: cola.ops.operator_base.LinearOperator, B: cola.ops.operator_base.LinearOperator)[source]
cola.fns.kronsum(A: cola.ops.operators.KronSum, B: cola.ops.operator_base.LinearOperator)[source]
cola.fns.kronsum(A: cola.ops.operator_base.LinearOperator, B: cola.ops.operators.KronSum)[source]
cola.fns.block_diag(*ops)[source]

Construct a block diagonal operator from a list of ops.