Warning: This API is deprecated and will be removed in a future version of TensorFlow after the replacement is stable.

# Lu

public final class Lu

Computes the LU decomposition of one or more square matrices.

The input is a tensor of shape `[..., M, M]` whose inner-most 2 dimensions form square matrices.

The input has to be invertible.

The output consists of two tensors LU and P containing the LU decomposition of all input submatrices `[..., :, :]`. LU encodes the lower triangular and upper triangular factors.

For each input submatrix of shape `[M, M]`, L is a lower triangular matrix of shape `[M, M]` with unit diagonal whose entries correspond to the strictly lower triangular part of LU. U is a upper triangular matrix of shape `[M, M]` whose entries correspond to the upper triangular part, including the diagonal, of LU.

P represents a permutation matrix encoded as a list of indices each between `0` and `M-1`, inclusive. If P_mat denotes the permutation matrix corresponding to P, then the L, U and P satisfies P_mat * input = L * U.

### Public Methods

 static Lu create(Scope scope, Operand input, Class outputIdxType) Factory method to create a class wrapping a new Lu operation. static Lu create(Scope scope, Operand input) Factory method to create a class wrapping a new Lu operation using default output types. Output lu() A tensor of shape `[..., M, M]` whose strictly lower triangular part denotes the lower triangular factor `L` with unit diagonal, and whose upper triangular part denotes the upper triangular factor `U`. Output p() Permutation of the rows encoded as a list of indices in `0..M-1`.

## Public Methods

#### public static Lu<T, U> create(Scope scope, Operand<T> input, Class<U> outputIdxType)

Factory method to create a class wrapping a new Lu operation.

##### Parameters
scope current scope A tensor of shape `[..., M, M]` whose inner-most 2 dimensions form matrices of size `[M, M]`.
##### Returns
• a new instance of Lu

#### public static Lu<T, Integer> create(Scope scope, Operand<T> input)

Factory method to create a class wrapping a new Lu operation using default output types.

##### Parameters
scope current scope A tensor of shape `[..., M, M]` whose inner-most 2 dimensions form matrices of size `[M, M]`.
##### Returns
• a new instance of Lu

#### public Output<T> lu()

A tensor of shape `[..., M, M]` whose strictly lower triangular part denotes the lower triangular factor `L` with unit diagonal, and whose upper triangular part denotes the upper triangular factor `U`.

#### public Output<U> p()

Permutation of the rows encoded as a list of indices in `0..M-1`. Shape is `[..., M]`.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]