Class LinearOperatorLowerTriangular

This operator acts like a [batch] lower triangular matrix A with shape
[B1,...,Bb, N, N] for some b >= 0. The first b indices index a
batch member. For every batch index (i1,...,ib), A[i1,...,ib, : :] is
an N x N matrix.

LinearOperatorLowerTriangular is initialized with a Tensor having
dimensions [B1,...,Bb, N, N]. The upper triangle of the last two
dimensions is ignored.

Performance

Suppose operator is a LinearOperatorLowerTriangular of shape [N, N],
and x.shape = [N, R]. Then

operator.matmul(x) involves N^2 * R multiplications.

operator.solve(x) involves N * R size N back-substitutions.

operator.determinant() involves a size Nreduce_prod.

If instead operator and x have shape [B1,...,Bb, N, N] and
[B1,...,Bb, N, R], every operation increases in complexity by B1*...*Bb.

Matrix property hints

This LinearOperator is initialized with boolean flags of the form is_X,
for X = non_singular, self_adjoint, positive_definite, square.
These have the following meaning:

If is_X == True, callers should expect the operator to have the
property X. This is a promise that should be fulfilled, but is not a
runtime assert. For example, finite floating point precision may result
in these promises being violated.

If is_X == False, callers should expect the operator to not have X.

If is_X == None (the default), callers should have no expectation either
way.

Args:

is_non_singular: Expect that this operator is non-singular.
This operator is non-singular if and only if its diagonal elements are
all non-zero.

is_self_adjoint: Expect that this operator is equal to its hermitian
transpose. This operator is self-adjoint only if it is diagonal with
real-valued diagonal entries. In this case it is advised to use
LinearOperatorDiag.

is_positive_definite: Expect that this operator is positive definite,
meaning the quadratic form x^H A x has positive real part for all
nonzero x. Note that we do not require the operator to be
self-adjoint to be positive-definite. See:
https://en.wikipedia.org/wiki/Positive-definite_matrix#Extension_for_non-symmetric_matrices

is_square: Expect that this operator acts like square [batch] matrices.

name: A name for this LinearOperator.

Raises:

ValueError: If is_square is False.

Properties

batch_shape

TensorShape of batch dimensions of this LinearOperator.

If this operator acts like the batch matrix A with
A.shape = [B1,...,Bb, M, N], then this returns
TensorShape([B1,...,Bb]), equivalent to A.get_shape()[:-2]

Returns:

TensorShape, statically determined, may be undefined.

domain_dimension

Dimension (in the sense of vector spaces) of the domain of this operator.

If this operator acts like the batch matrix A with
A.shape = [B1,...,Bb, M, N], then this returns N.

Returns:

Dimension object.

dtype

The DType of Tensors handled by this LinearOperator.

graph_parents

List of graph dependencies of this LinearOperator.

is_non_singular

is_positive_definite

is_self_adjoint

is_square

Return True/False depending on if this operator is square.

name

Name prepended to all ops created by this LinearOperator.

range_dimension

Dimension (in the sense of vector spaces) of the range of this operator.

If this operator acts like the batch matrix A with
A.shape = [B1,...,Bb, M, N], then this returns M.

Returns:

Dimension object.

shape

TensorShape of this LinearOperator.

If this operator acts like the batch matrix A with
A.shape = [B1,...,Bb, M, N], then this returns
TensorShape([B1,...,Bb, M, N]), equivalent to A.get_shape().

Returns:

TensorShape, statically determined, may be undefined.

tensor_rank

Rank (in the sense of tensors) of matrix corresponding to this operator.

If this operator acts like the batch matrix A with
A.shape = [B1,...,Bb, M, N], then this returns b + 2.

Args:

x: Tensor with compatible shape and same dtype as self.
x is treated as a [batch] vector meaning for every set of leading
dimensions, the last dimension defines a vector.
See class docstring for definition of compatibility.

adjoint: Python bool. If True, left multiply by the adjoint: A^H x.

name: A name for this `Op.

Returns:

A Tensor with shape [..., M] and same dtype as self.

range_dimension_tensor

range_dimension_tensor(name='range_dimension_tensor')

Dimension (in the sense of vector spaces) of the range of this operator.

Determined at runtime.

If this operator acts like the batch matrix A with
A.shape = [B1,...,Bb, M, N], then this returns M.

Args:

name: A name for this Op.

Returns:

int32Tensor

shape_tensor

shape_tensor(name='shape_tensor')

Shape of this LinearOperator, determined at runtime.

If this operator acts like the batch matrix A with
A.shape = [B1,...,Bb, M, N], then this returns a Tensor holding
[B1,...,Bb, M, N], equivalent to tf.shape(A).

Args:

name: A name for this `Op.

Returns:

int32Tensor

solve

solve(
rhs,
adjoint=False,
adjoint_arg=False,
name='solve'
)

Solve (exact or approx) R (batch) systems of equations: A X = rhs.

The returned Tensor will be close to an exact solution if A is well
conditioned. Otherwise closeness will vary. See class docstring for details.

Args:

rhs: Tensor with same dtype as this operator and compatible shape.
rhs is treated like a [batch] matrix meaning for every set of leading
dimensions, the last two dimensions defines a matrix.
See class docstring for definition of compatibility.

adjoint: Python bool. If True, solve the system involving the adjoint
of this LinearOperator: A^H X = rhs.

adjoint_arg: Python bool. If True, solve A X = rhs^H where rhs^H
is the hermitian transpose (transposition and complex conjugation).

name: A name scope to use for ops added by this method.

Returns:

Tensor with shape [...,N, R] and same dtype as rhs.

Raises:

NotImplementedError: If self.is_non_singular or is_square is False.

solvevec

solvevec(
rhs,
adjoint=False,
name='solve'
)

Solve single equation with best effort: A X = rhs.

The returned Tensor will be close to an exact solution if A is well
conditioned. Otherwise closeness will vary. See class docstring for details.

Args:

rhs: Tensor with same dtype as this operator.
rhs is treated like a [batch] vector meaning for every set of leading
dimensions, the last dimension defines a vector. See class docstring
for definition of compatibility regarding batch dimensions.

adjoint: Python bool. If True, solve the system involving the adjoint
of this LinearOperator: A^H X = rhs.

name: A name scope to use for ops added by this method.

Returns:

Tensor with shape [...,N] and same dtype as rhs.

Raises:

NotImplementedError: If self.is_non_singular or is_square is False.

tensor_rank_tensor

tensor_rank_tensor(name='tensor_rank_tensor')

Rank (in the sense of tensors) of matrix corresponding to this operator.

If this operator acts like the batch matrix A with
A.shape = [B1,...,Bb, M, N], then this returns b + 2.