Class SequenceMatrix
java.lang.Object
com.singularsys.extensions.matrix.sequencemat.SequenceMatrix
- All Implemented Interfaces:
MatrixI,Serializable
A Matrix where elements are stored as a one dimensional array of
double values.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleaneq(SequenceMatrix mat) booleandoublegetDEle(int i, int j) Gets the dimensions of the Vector or MatrixgetEle(int i, int j) Gets an element of a matrixintgetNCols()The number of columnsintgetNRows()The number of rowsinthashCode()static SequenceMatrixnewInstance(double[][] in) static SequenceMatrixnewInstance(DoubleVector[] rows) static SequenceMatrixnewInstance(Double[][] in) voidSet an element of a matrixObject[][]Copies the data to an arraydouble[][]toString()
-
Method Details
-
newInstance
-
newInstance
-
newInstance
-
getEle
Description copied from interface:MatrixIGets an element of a matrix- Specified by:
getElein interfaceMatrixI- Parameters:
i- the rowj- the column- Returns:
- the element
- Throws:
EvaluationException- if the index is out of range. Since Jep 4.1 extensions 2.2 this now throws an EvaluationException
-
getDEle
- Throws:
EvaluationException
-
getNRows
public int getNRows()Description copied from interface:MatrixIThe number of rows -
getNCols
public int getNCols()Description copied from interface:MatrixIThe number of columns -
getDimensions
Description copied from interface:MatrixIGets the dimensions of the Vector or Matrix- Specified by:
getDimensionsin interfaceMatrixI- Returns:
- the dimensions
-
toArrayMat
public double[][] toArrayMat() -
toString
-
setEle
Description copied from interface:MatrixISet an element of a matrix- Specified by:
setElein interfaceMatrixI- Parameters:
row-col-val- value to set- Throws:
EvaluationException
-
toArray
Description copied from interface:MatrixICopies the data to an array- Specified by:
toArrayin interfaceMatrixI- Parameters:
mat-- Returns:
- mat with the elements filled in
- Throws:
EvaluationException- if mat is not a matrix of the correct size
-
hashCode
public int hashCode() -
equals
-
eq
-