public class NDLinalg extends Object
| Constructor and Description |
|---|
NDLinalg() |
| Modifier and Type | Method and Description |
|---|---|
INDArray |
cholesky(INDArray input)
Computes the Cholesky decomposition of one or more square matrices.
|
INDArray |
cross(INDArray a,
INDArray b)
Computes pairwise cross product.
|
INDArray |
diag_part(INDArray input)
Calculates diagonal tensor.
|
INDArray |
diag(INDArray input)
Calculates diagonal tensor.
|
INDArray |
logdet(INDArray input)
Calculates log of determinant.
|
INDArray |
lstsq(INDArray matrix,
INDArray rhs,
double l2_reguralizer)
Solver for linear squares problems.
|
INDArray |
lstsq(INDArray matrix,
INDArray rhs,
double l2_reguralizer,
boolean fast)
Solver for linear squares problems.
|
INDArray |
lu(INDArray input)
Computes LU decomposition.
|
INDArray |
matmul(INDArray a,
INDArray b)
Performs matrix mutiplication on input tensors.
|
INDArray[] |
matrixBandPart(INDArray input,
int minLower,
int maxUpper)
Copy a tensor setting outside a central band in each innermost matrix.
|
INDArray |
mmul(INDArray x,
INDArray y)
Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc. |
INDArray |
mmul(INDArray x,
INDArray y,
boolean transposeX,
boolean transposeY,
boolean transposeZ)
Matrix multiplication: out = mmul(x,y)
Supports specifying transpose argument to perform operation such as mmul(a^T, b), etc. |
INDArray[] |
qr(INDArray input)
Computes the QR decompositions of input matrix.
|
INDArray[] |
qr(INDArray input,
boolean full)
Computes the QR decompositions of input matrix.
|
INDArray |
solve(INDArray matrix,
INDArray rhs)
Solver for systems of linear equations.
|
INDArray |
solve(INDArray matrix,
INDArray rhs,
boolean adjoint)
Solver for systems of linear equations.
|
INDArray |
svd(INDArray input,
boolean fullUV,
boolean computeUV)
Calculates singular value decomposition.
|
INDArray |
svd(INDArray input,
boolean fullUV,
boolean computeUV,
int switchNum)
Calculates singular value decomposition.
|
INDArray |
tri(DataType dataType,
int row,
int column,
int diagonal)
An array with ones at and below the given diagonal and zeros elsewhere.
|
INDArray |
tri(int row,
int column)
An array with ones at and below the given diagonal and zeros elsewhere.
|
INDArray |
triangularSolve(INDArray matrix,
INDArray rhs,
boolean lower,
boolean adjoint)
Solver for systems of linear questions.
|
INDArray |
triu(INDArray input)
Upper triangle of an array.
|
INDArray |
triu(INDArray input,
int diag)
Upper triangle of an array.
|
public INDArray cholesky(INDArray input)
input - Input tensor with inner-most 2 dimensions forming square matrices (NUMERIC type)public INDArray lstsq(INDArray matrix, INDArray rhs, double l2_reguralizer, boolean fast)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)l2_reguralizer - regularizerfast - fast mode, defaults to Truepublic INDArray lstsq(INDArray matrix, INDArray rhs, double l2_reguralizer)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)l2_reguralizer - regularizerpublic INDArray lu(INDArray input)
input - input tensor (NUMERIC type)public INDArray matmul(INDArray a, INDArray b)
a - input tensor (NUMERIC type)b - input tensor (NUMERIC type)public INDArray[] matrixBandPart(INDArray input, int minLower, int maxUpper)
input - input tensor (NUMERIC type)minLower - lower diagonal countmaxUpper - upper diagonal countpublic INDArray[] qr(INDArray input, boolean full)
input - input tensor (NUMERIC type)full - full matrices modepublic INDArray[] qr(INDArray input)
input - input tensor (NUMERIC type)public INDArray solve(INDArray matrix, INDArray rhs, boolean adjoint)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)adjoint - adjoint mode, defaults to Falsepublic INDArray solve(INDArray matrix, INDArray rhs)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)public INDArray triangularSolve(INDArray matrix, INDArray rhs, boolean lower, boolean adjoint)
matrix - input tensor (NUMERIC type)rhs - input tensor (NUMERIC type)lower - defines whether innermost matrices in matrix are lower or upper triangularadjoint - adjoint modepublic INDArray cross(INDArray a, INDArray b)
a - (NUMERIC type)b - (NUMERIC type)public INDArray diag(INDArray input)
input - (NUMERIC type)public INDArray diag_part(INDArray input)
input - (NUMERIC type)public INDArray logdet(INDArray input)
input - (NUMERIC type)public INDArray mmul(INDArray x, INDArray y, boolean transposeX, boolean transposeY, boolean transposeZ)
x - First input variable (NUMERIC type)y - Second input variable (NUMERIC type)transposeX - Transpose x (first argument)transposeY - Transpose y (second argument)transposeZ - Transpose result arraypublic INDArray mmul(INDArray x, INDArray y)
x - First input variable (NUMERIC type)y - Second input variable (NUMERIC type)public INDArray svd(INDArray input, boolean fullUV, boolean computeUV, int switchNum)
input - (NUMERIC type)fullUV - computeUV - switchNum - public INDArray svd(INDArray input, boolean fullUV, boolean computeUV)
input - (NUMERIC type)fullUV - computeUV - public INDArray tri(DataType dataType, int row, int column, int diagonal)
dataType - Data typerow - column - diagonal - public INDArray tri(int row, int column)
row - column - public INDArray triu(INDArray input, int diag)
input - (NUMERIC type)diag - Copyright © 2021. All rights reserved.