public static class FemMatrixGenerator.CRSMatrix
extends java.lang.Object
DirectSolver.| Modifier and Type | Field and Description |
|---|---|
int[] |
colIdxs
1-based column indices of the upper triangular non-zeros.
|
int[] |
rowOffs
1-based row start offsets, of length
size+1. |
int |
size
Number of rows (and columns).
|
int |
type
Matrix type, either
Matrix.SPD or Matrix.SYMMETRIC. |
double[] |
vals
Values of the upper triangular non-zeros.
|
| Constructor and Description |
|---|
CRSMatrix() |
| Modifier and Type | Method and Description |
|---|---|
double[] |
copyVals()
Returns a copy of the values, so that a solver may destroy them.
|
long |
numFullVals()
Returns the number of non-zeros in the full symmetric matrix.
|
int |
numVals()
Returns the number of upper triangular non-zeros.
|
double |
residual(double[] x,
double[] b)
Computes the residual
||M x - b|| for this matrix. |
SparseCRSMatrix |
toSparseCRSMatrix()
Converts this matrix to a
SparseCRSMatrix, for use with the
Matrix based solver methods. |
public int size
public int[] rowOffs
size+1.public int[] colIdxs
public double[] vals
public int type
Matrix.SPD or Matrix.SYMMETRIC.public int numVals()
public long numFullVals()
public double[] copyVals()
public double residual(double[] x,
double[] b)
||M x - b|| for this matrix.x - solution vectorb - right hand sidepublic SparseCRSMatrix toSparseCRSMatrix()
SparseCRSMatrix, for use with the
Matrix based solver methods. Only the upper triangle is set,
as expected by DirectSolver.analyze(Matrix,int,int).SparseCRSMatrix form