Class SymMatrix
java.lang.Object
edu.cmu.tetrad.study.gene.tetrad.gene.algorithm.util.BasicMatrix
edu.cmu.tetrad.study.gene.tetrad.gene.algorithm.util.BasicLTMatrix
edu.cmu.tetrad.study.gene.tetrad.gene.algorithm.util.LTMatrix
edu.cmu.tetrad.study.gene.tetrad.gene.algorithm.util.SymMatrix
Implements a space-efficient symmetric matrix (of elements of type
short
), storing only the lower
triangular portion of it- Author:
- Raul Saavedra (rsaavedr@ai.uwf.edu)
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshort
getValue
(int row, int col) Returns the value of element at (row
,col
)void
setValue
(int row, int col, int x) Sets the value of element (row
,col
) tox
void
setValue
(int row, int col, short x) Sets the value of element (row
,col
) tox
toString()
Returns a specially formatted string with all the contents of this matrixMethods inherited from class edu.cmu.tetrad.study.gene.tetrad.gene.algorithm.util.LTMatrix
getDoubleValue, initMatrixStorage, setAllValuesToZero, setDoubleValue
Methods inherited from class edu.cmu.tetrad.study.gene.tetrad.gene.algorithm.util.BasicMatrix
badIndexXcp, getName, getSize, setName
-
Constructor Details
-
SymMatrix
Creates a symmetric matrix withnrows
rows. -
SymMatrix
Creates a symmetric matrix reading it from filefname
.- Throws:
IOException
-
-
Method Details
-
setValue
public void setValue(int row, int col, int x) Sets the value of element (row
,col
) tox
-
setValue
public void setValue(int row, int col, short x) Sets the value of element (row
,col
) tox
-
getValue
public short getValue(int row, int col) Returns the value of element at (row
,col
) -
toString
Returns a specially formatted string with all the contents of this matrix
-