Class Matrix<E>


  • public class Matrix<E>
    extends java.lang.Object
    A simple double array matrix implementation.
    Since:
    11gR2
    • Constructor Summary

      Constructors 
      Constructor Description
      Matrix​(int rows, int cols, java.lang.Class<E> clazz)
      Constructs an empty matrix with the specified dimensions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E get​(int row, int col)
      Returns the element at the specified row and column.
      E[] getColumn​(int col)  
      int getColumnDimension()
      Returns the column dimension.
      E[] getRow​(int row)  
      int getRowDimension()
      Returns the row dimension.
      void set​(int row, int col, E elem)
      Sets the element at the specified row and column.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Matrix

        public Matrix​(int rows,
                      int cols,
                      java.lang.Class<E> clazz)
        Constructs an empty matrix with the specified dimensions.
        Parameters:
        rows - row dimension
        cols - column dimension
    • Method Detail

      • getColumnDimension

        public int getColumnDimension()
        Returns the column dimension.
        Returns:
      • getRowDimension

        public int getRowDimension()
        Returns the row dimension.
        Returns:
      • get

        public E get​(int row,
                     int col)
        Returns the element at the specified row and column.
        Parameters:
        row - row of the element
        col - column of the element
        Returns:
      • set

        public void set​(int row,
                        int col,
                        E elem)
        Sets the element at the specified row and column.
        Parameters:
        row - row of the element
        col - column of the element
        elem - element
      • getRow

        public E[] getRow​(int row)
      • getColumn

        public E[] getColumn​(int col)