Solves tridiagonal systems of equations.
tf.raw_ops.TridiagonalSolve(
diagonals, rhs, partial_pivoting=True, name=None
)
Solves tridiagonal systems of equations.
Supports batch dimensions and multiple right-hand sides per each left-hand
side.
On CPU, solution is computed via Gaussian elimination with or without partial
pivoting, depending on partial_pivoting
attribute. On GPU, Nvidia's cuSPARSE
library is used: https://docs.nvidia.com/cuda/cusparse/index.html#gtsv
Partial pivoting is not yet supported by XLA backends.
Args | |
---|---|
diagonals
|
A Tensor . Must be one of the following types: float64 , float32 , complex64 , complex128 .
Tensor of shape [..., 3, M] whose innermost 2 dimensions represent the
tridiagonal matrices with three rows being the superdiagonal, diagonals, and
subdiagonals, in order. The last element of the superdiagonal and the first
element of the subdiagonal is ignored.
|
rhs
|
A Tensor . Must have the same type as diagonals .
Tensor of shape [..., M, K] , representing K right-hand sides per each
left-hand side.
|
partial_pivoting
|
An optional bool . Defaults to True .
Whether to apply partial pivoting. Partial pivoting makes the procedure more
stable, but slower.
|
name
|
A name for the operation (optional). |
Returns | |
---|---|
A Tensor . Has the same type as diagonals .
|