Class IntegerMatrix<R,C>

java.lang.Object
ubic.basecode.dataStructure.matrix.AbstractMatrix<R,C,Integer>
ubic.basecode.dataStructure.matrix.IntegerMatrix<R,C>
All Implemented Interfaces:
Serializable, Matrix2D<R,C,Integer>, PrimitiveMatrix<R,C,Integer>

public class IntegerMatrix<R,C> extends AbstractMatrix<R,C,Integer> implements PrimitiveMatrix<R,C,Integer>
Author:
pavlidis
See Also:
  • Constructor Details

    • IntegerMatrix

      public IntegerMatrix(int x, int y)
  • Method Details

    • columns

      public int columns()
      Description copied from interface: Matrix2D
      Get the number of columns the matrix has.
      Specified by:
      columns in interface Matrix2D<R,C,Integer>
      Returns:
    • get

      public Integer get(int row, int column)
      Parameters:
      row -
      column -
      Returns:
    • getByKeys

      public Integer getByKeys(R r, C c)
      Specified by:
      getByKeys in interface Matrix2D<R,C,Integer>
      Parameters:
      r -
      c -
    • getColObj

      public Integer[] getColObj(int col)
      Specified by:
      getColObj in interface PrimitiveMatrix<R,C,Integer>
      Parameters:
      col -
      Returns:
    • getColumn

      public Integer[] getColumn(int col)
    • getEntry

      public Integer getEntry(int row, int column)
      Specified by:
      getEntry in interface Matrix2D<R,C,Integer>
      Parameters:
      row -
      column -
      Returns:
    • getObject

      public Integer getObject(int row, int col)
      Specified by:
      getObject in interface PrimitiveMatrix<R,C,Integer>
      Parameters:
      row -
      col -
      Returns:
    • getRow

      public Integer[] getRow(int row)
    • getRowObj

      public Integer[] getRowObj(int row)
      Specified by:
      getRowObj in interface PrimitiveMatrix<R,C,Integer>
      Parameters:
      row -
      Returns:
    • isMissing

      public boolean isMissing(int i, int j)
      Description copied from interface: Matrix2D
      Check if the value at a given index is missing.
      Specified by:
      isMissing in interface Matrix2D<R,C,Integer>
      Parameters:
      i - row
      j - column
      Returns:
      true if the value is missing, false otherwise.
    • rows

      public int rows()
      Description copied from interface: Matrix2D
      Get the number of rows the matrix has
      Specified by:
      rows in interface Matrix2D<R,C,Integer>
      Returns:
    • set

      public void set(int row, int column, Integer value)
      Specified by:
      set in interface Matrix2D<R,C,Integer>
      Parameters:
      row -
      column -
      value -
    • setByKeys

      public void setByKeys(R r, C c, Integer v)
      Specified by:
      setByKeys in interface Matrix2D<R,C,Integer>
      Parameters:
      r -
      c -
      v -
    • setObj

      public void setObj(int row, int column, Integer value)
      Parameters:
      row -
      column -
      value -
    • size

      public int size()
      Specified by:
      size in class AbstractMatrix<R,C,Integer>
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      java.lang.Integer