Class SequenceMatrix
- java.lang.Object
-
- com.singularsys.extensions.matrix.sequencemat.SequenceMatrix
-
- All Implemented Interfaces:
MatrixI,java.io.Serializable
public final class SequenceMatrix extends java.lang.Object implements MatrixI, java.io.Serializable
A Matrix where elements are stored as a one dimensional array ofdoublevalues.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleaneq(SequenceMatrix mat)booleanequals(java.lang.Object obj)doublegetDEle(int i, int j)DimensionsgetDimensions()Gets the dimensions of the Vector or Matrixjava.lang.DoublegetEle(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(java.lang.Double[][] in)voidsetEle(int row, int col, java.lang.Object val)Set an element of a matrixjava.lang.Object[][]toArray(java.lang.Object[][] mat)Copies the data to an arraydouble[][]toArrayMat()java.lang.StringtoString()
-
-
-
Method Detail
-
newInstance
public static SequenceMatrix newInstance(java.lang.Double[][] in)
-
newInstance
public static SequenceMatrix newInstance(double[][] in)
-
newInstance
public static SequenceMatrix newInstance(DoubleVector[] rows)
-
getEle
public java.lang.Double getEle(int i, int j)Description copied from interface:MatrixIGets an element of a matrix
-
getDEle
public double getDEle(int i, int j)
-
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
public Dimensions 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
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setEle
public void setEle(int row, int col, java.lang.Object val) throws EvaluationExceptionDescription copied from interface:MatrixISet an element of a matrix- Specified by:
setElein interfaceMatrixIval- value to set- Throws:
EvaluationException
-
toArray
public java.lang.Object[][] toArray(java.lang.Object[][] mat) throws EvaluationExceptionDescription copied from interface:MatrixICopies the data to an array- Specified by:
toArrayin interfaceMatrixI- Returns:
- mat with the elements filled in
- Throws:
EvaluationException- if mat is not a matrix of the correct size
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
eq
public boolean eq(SequenceMatrix mat)
-
-