public class SymmetricMatrix extends Object implements MutableMatrix, Serializable
e(i,j) == e(j,i).| Constructor and Description |
|---|
SymmetricMatrix(int size)
Creates a new instance of SymmetricMatrix with all elements
set to zero.
|
SymmetricMatrix(int size,
double[] initialValues,
boolean isLower)
Creates a new instance of SymmetricMatrix with the
given initial values.
|
SymmetricMatrix(Matrix mIn)
Construct a SymmetricMatrix by copying an existing matrix.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
asPackedArray(boolean isLower)
Returns the matrix as a packed array
|
double |
det() |
double |
diagonal(int index)
Returns the diagonal element for the given row/column
|
double |
e(int x,
int y)
Returns a specific element
|
int |
getNColumns()
Returns the number of columns
|
int |
getNRows()
Returns the number of rows
|
void |
incrementElement(int x,
int y,
double value)
Increment a specific element
|
void |
invert()
Invert this matrix (into itself)
|
void |
setElement(int x,
int y,
double value)
Set a specific element
|
String |
toString() |
void |
transpose()
Tranpose this matrix (into itself)
|
public SymmetricMatrix(int size)
size - The rank of the matrixpublic SymmetricMatrix(Matrix mIn)
public SymmetricMatrix(int size,
double[] initialValues,
boolean isLower)
size - The rank of the matrixinitialValues - The initial values for the matrixisLower - If true initial values must be m(0,0), m(1,0), m(1,1), ... otherwise m(0,0), m(0,1), m(0,2), ...public double[] asPackedArray(boolean isLower)
isLower - if true array is packed m(0,0), m(1,0), m(1,1),... else m(0,0), m(0,1), m(0,2), ...public int getNRows()
Matrixpublic int getNColumns()
MatrixgetNColumns in interface Matrixpublic double diagonal(int index)
public void setElement(int x,
int y,
double value)
setElement in interface MutableMatrixpublic void incrementElement(int x,
int y,
double value)
public double det()
public void invert()
throws MatrixOp.IndeterminateMatrixException
MutableMatrixinvert in interface MutableMatrixMatrixOp.IndeterminateMatrixExceptionMatrixOp.inverse(Matrix,MutableMatrix)public void transpose()
MutableMatrixtranspose in interface MutableMatrixMatrixOp.transposed(Matrix,MutableMatrix)Jas4pp 1.5 © Java Analysis Studio for Particle Physics