Class SymmMatrix
java.lang.Object
smile.tensor.SymmMatrix
- All Implemented Interfaces:
Serializable, Matrix, Tensor
The symmetric matrix in packed storage.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionabstract SymmMatrixcopy()Returns a deep copy of matrix.booleanvoidMatrix-vector multiplication.intncol()Returns the number of columns.intnrow()Returns the number of rows.static SymmMatrixReturns a symmetric matrix from a two-dimensional array.static SymmMatrixReturns a symmetric matrix from a two-dimensional array.static SymmMatrixof(DenseMatrix A) Returns a symmetric matrix from a dense matrix.order()Returns the matrix layout.scale(double alpha) A *= alphasolve(double[] b) Solve A * x = b.solve(float[] b) Solve A * x = b.voidsolve(DenseMatrix B) Solves the linear systemA * X = B.Returns the transpose of matrix.uplo()Gets the format of packed matrix.static SymmMatrixzeros(ScalarType scalarType, UPLO uplo, int n) Returns a zero matrix.Methods inherited from class Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Matrix
add, apply, diagonal, dim, div, get, get, length, mul, mv, mv, mv, mv, mv, reshape, set, set, shape, size, sub, toArray, toArray, toString, toString, trace, tv, tv, tv, tv, tv, update, vector, vector, vector, xAxMethods inherited from interface Tensor
scalarType
-
Method Details
-
zeros
Returns a zero matrix.- Parameters:
uplo- the symmetric matrix stores the upper or lower triangle.n- the dimension of matrix.- Returns:
- the packed symmetric matrix.
-
of
Returns a symmetric matrix from a dense matrix.- Parameters:
A- the dense symmetric matrix.- Returns:
- the packed symmetric matrix.
-
of
Returns a symmetric matrix from a two-dimensional array.- Parameters:
uplo- the symmetric matrix stores the upper or lower triangle.AP- the symmetric matrix.- Returns:
- the packed symmetric matrix.
-
of
Returns a symmetric matrix from a two-dimensional array.- Parameters:
uplo- the symmetric matrix stores the upper or lower triangle.AP- the symmetric matrix.- Returns:
- the packed symmetric matrix.
-
nrow
-
ncol
-
scale
Description copied from interface:MatrixA *= alpha -
copy
Description copied from interface:MatrixReturns a deep copy of matrix. -
transpose
Description copied from interface:MatrixReturns the transpose of matrix. The transpose may share the storage with this matrix. -
order
-
uplo
-
equals
-
mv
Description copied from interface:MatrixMatrix-vector multiplication.y = alpha * A * x + beta * y -
solve
Solve A * x = b.- Parameters:
b- the right hand side of linear systems.- Returns:
- the solution vector.
- Throws:
RuntimeException- when the matrix is singular.
-
solve
Solve A * x = b.- Parameters:
b- the right hand side of linear systems.- Returns:
- the solution vector.
- Throws:
RuntimeException- when the matrix is singular.
-
solve
Solves the linear systemA * X = B.- Parameters:
B- the right hand side of linear systems. On output, B will be overwritten with the solution matrix.
-