Class 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 of double values.
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        public static SequenceMatrix newInstance​(java.lang.Double[][] in)
      • newInstance

        public static SequenceMatrix newInstance​(double[][] in)
      • getEle

        public java.lang.Double getEle​(int i,
                                       int j)
        Description copied from interface: MatrixI
        Gets an element of a matrix
        Specified by:
        getEle in interface MatrixI
        Parameters:
        i - the row
        j - the column
        Returns:
        the element
      • getDEle

        public double getDEle​(int i,
                              int j)
      • getNRows

        public int getNRows()
        Description copied from interface: MatrixI
        The number of rows
        Specified by:
        getNRows in interface MatrixI
        Returns:
        number of rows
      • getNCols

        public int getNCols()
        Description copied from interface: MatrixI
        The number of columns
        Specified by:
        getNCols in interface MatrixI
        Returns:
        number of columns
      • getDimensions

        public Dimensions getDimensions()
        Description copied from interface: MatrixI
        Gets the dimensions of the Vector or Matrix
        Specified by:
        getDimensions in interface MatrixI
        Returns:
        the dimensions
      • toArrayMat

        public double[][] toArrayMat()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toArray

        public java.lang.Object[][] toArray​(java.lang.Object[][] mat)
                                     throws EvaluationException
        Description copied from interface: MatrixI
        Copies the data to an array
        Specified by:
        toArray in interface MatrixI
        Returns:
        mat with the elements filled in
        Throws:
        EvaluationException - if mat is not a matrix of the correct size
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object