public class FloatSymmMatrix extends SMatrix
Modifier and Type | Class and Description |
---|---|
static class |
FloatSymmMatrix.BunchKaufman
The LU decomposition.
|
static class |
FloatSymmMatrix.Cholesky
The Cholesky decomposition of a symmetric, positive-definite matrix.
|
Constructor and Description |
---|
FloatSymmMatrix(UPLO uplo,
float[][] AP)
Constructor.
|
FloatSymmMatrix(UPLO uplo,
int n)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
FloatSymmMatrix.BunchKaufman |
bk()
Bunch-Kaufman decomposition.
|
FloatSymmMatrix.Cholesky |
cholesky()
Cholesky decomposition for symmetric and positive definite matrix.
|
FloatSymmMatrix |
clone() |
boolean |
equals(FloatSymmMatrix o,
float eps)
Returns if two matrices equals given an error margin.
|
boolean |
equals(java.lang.Object o) |
float |
get(int i,
int j)
Returns A[i, j].
|
Layout |
layout()
Returns the matrix layout.
|
void |
mv(float[] work,
int inputOffset,
int outputOffset)
Matrix-vector multiplication A * x.
|
void |
mv(Transpose trans,
float alpha,
float[] x,
float beta,
float[] y)
Matrix-vector multiplication.
|
int |
ncols()
Returns the number of columns.
|
int |
nrows()
Returns the number of rows.
|
FloatSymmMatrix |
set(int i,
int j,
float x)
Sets A[i,j] = x.
|
long |
size()
Returns the number of stored matrix elements.
|
void |
tv(float[] work,
int inputOffset,
int outputOffset)
Matrix-vector multiplication A' * x.
|
UPLO |
uplo()
Gets the format of packed matrix.
|
apply, diag, market, mv, mv, mv, trace, tv, tv, tv, update
public FloatSymmMatrix(UPLO uplo, int n)
uplo
- the symmetric matrix stores the upper or lower triangle.n
- the dimension of matrix.public FloatSymmMatrix(UPLO uplo, float[][] AP)
uplo
- the symmetric matrix stores the upper or lower triangle.AP
- the symmetric matrix.public FloatSymmMatrix clone()
clone
in class java.lang.Object
public int nrows()
IMatrix
public int ncols()
IMatrix
public long size()
IMatrix
public Layout layout()
public UPLO uplo()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(FloatSymmMatrix o, float eps)
o
- the other matrix.eps
- the error margin.public float get(int i, int j)
SMatrix
public FloatSymmMatrix set(int i, int j, float x)
SMatrix
public void mv(Transpose trans, float alpha, float[] x, float beta, float[] y)
SMatrix
y = alpha * op(A) * x + beta * y
where op is the transpose operation.public void mv(float[] work, int inputOffset, int outputOffset)
IMatrix
public void tv(float[] work, int inputOffset, int outputOffset)
IMatrix
public FloatSymmMatrix.BunchKaufman bk()
public FloatSymmMatrix.Cholesky cholesky()
java.lang.ArithmeticException
- if the matrix is not positive definite.