public abstract class SMatrix extends IMatrix<float[]>
Constructor and Description |
---|
SMatrix() |
Modifier and Type | Method and Description |
---|---|
float |
apply(int i,
int j)
Returns A[i, j].
|
float[] |
diag()
Returns the diagonal elements.
|
abstract float |
get(int i,
int j)
Returns A[i, j].
|
static SMatrix |
market(java.nio.file.Path path)
Reads a matrix from a Matrix Market File Format file.
|
float[] |
mv(float[] x)
Returns the matrix-vector multiplication A * x.
|
void |
mv(float[] x,
float[] y)
Matrix-vector multiplication y = A * x.
|
void |
mv(float alpha,
float[] x,
float beta,
float[] y)
Matrix-vector multiplication.
|
abstract void |
mv(Transpose trans,
float alpha,
float[] x,
float beta,
float[] y)
Matrix-vector multiplication.
|
abstract SMatrix |
set(int i,
int j,
float x)
Sets A[i,j] = x.
|
float |
trace()
Returns the matrix trace.
|
float[] |
tv(float[] x)
Returns Matrix-vector multiplication A' * x.
|
void |
tv(float[] x,
float[] y)
Matrix-vector multiplication y = A' * x.
|
void |
tv(float alpha,
float[] x,
float beta,
float[] y)
Matrix-vector multiplication.
|
SMatrix |
update(int i,
int j,
float x)
Sets A[i,j] = x for Scala users.
|
public abstract SMatrix set(int i, int j, float x)
public SMatrix update(int i, int j, float x)
public abstract float get(int i, int j)
public float apply(int i, int j)
public float[] diag()
public float trace()
public abstract void mv(Transpose trans, float alpha, float[] x, float beta, float[] y)
y = alpha * op(A) * x + beta * y
where op is the transpose operation.public float[] mv(float[] x)
IMatrix
public void mv(float[] x, float[] y)
IMatrix
public void mv(float alpha, float[] x, float beta, float[] y)
y = alpha * A * x + beta * y
public float[] tv(float[] x)
IMatrix
public void tv(float[] x, float[] y)
IMatrix
public void tv(float alpha, float[] x, float beta, float[] y)
y = alpha * A' * x + beta * y
public static SMatrix market(java.nio.file.Path path) throws java.io.IOException, java.text.ParseException
path
- the input file path.java.io.IOException
java.text.ParseException