Interface MatrixI

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Dimensions getDimensions()
      Gets the dimensions of the Vector or Matrix
      java.lang.Object getEle​(int row, int col)
      Gets an element of a matrix
      int getNCols()
      The number of columns
      int getNRows()
      The number of rows
      void setEle​(int row, int col, java.lang.Object val)
      Set an element of a matrix
      java.lang.Object[][] toArray​(java.lang.Object[][] mat)
      Copies the data to an array
    • Method Detail

      • getEle

        java.lang.Object getEle​(int row,
                                int col)
        Gets an element of a matrix
        Parameters:
        row - the row
        col - the column
        Returns:
        the element
      • setEle

        void setEle​(int row,
                    int col,
                    java.lang.Object val)
             throws EvaluationException
        Set an element of a matrix
        Parameters:
        row -
        col -
        val - value to set
        Throws:
        EvaluationException
      • getNRows

        int getNRows()
        The number of rows
        Returns:
        number of rows
      • getNCols

        int getNCols()
        The number of columns
        Returns:
        number of columns
      • getDimensions

        Dimensions getDimensions()
        Gets the dimensions of the Vector or Matrix
        Returns:
        the dimensions
      • toArray

        java.lang.Object[][] toArray​(java.lang.Object[][] mat)
                              throws EvaluationException
        Copies the data to an array
        Parameters:
        mat -
        Returns:
        mat with the elements filled in
        Throws:
        EvaluationException - if mat is not a matrix of the correct size