Class AbstractMatrix3D<R,C,S,V>

java.lang.Object
ubic.basecode.dataStructure.matrix.AbstractMatrix3D<R,C,S,V>
All Implemented Interfaces:
Matrix3D<R,C,S,V>
Direct Known Subclasses:
DenseObject3DMatrix, DoubleMatrix3D

public abstract class AbstractMatrix3D<R,C,S,V> extends Object implements Matrix3D<R,C,S,V>
TODO Document Me
Author:
Raymond
  • Field Details

  • Constructor Details

    • AbstractMatrix3D

      public AbstractMatrix3D()
  • Method Details

    • addColumnName

      public final void addColumnName(C s, int index)
      Description copied from interface: Matrix3D
      Add a column name associated with an index.
      Specified by:
      addColumnName in interface Matrix3D<R,C,S,V>
      Parameters:
      s - a column name
      index - int the column index associated with this name
    • addRowName

      public final void addRowName(R s, int index)
      Description copied from interface: Matrix3D
      Add a row name associated with a row index.
      Specified by:
      addRowName in interface Matrix3D<R,C,S,V>
      Parameters:
      s - row name
      index -
    • addSliceName

      public final void addSliceName(S s, int index)
      Description copied from interface: Matrix3D
      Add a slice name
      Specified by:
      addSliceName in interface Matrix3D<R,C,S,V>
      Parameters:
      s - name of the slice
      index -
    • columns

      public abstract int columns()
      Description copied from interface: Matrix3D
      Get the number of columns the matrix has.
      Specified by:
      columns in interface Matrix3D<R,C,S,V>
      Returns:
      int
    • containsColumnName

      public final boolean containsColumnName(Object columnName)
      Description copied from interface: Matrix3D
      Check if the matrix contains a column name
      Specified by:
      containsColumnName in interface Matrix3D<R,C,S,V>
      Returns:
      true if the matrix contains the column name
    • containsRowName

      public final boolean containsRowName(Object rowName)
      Description copied from interface: Matrix3D
      Check if the matrix contains a row name
      Specified by:
      containsRowName in interface Matrix3D<R,C,S,V>
      Parameters:
      rowName -
      Returns:
      true if the matrix contains the row name
    • containsSliceName

      public final boolean containsSliceName(Object sliceName)
      Description copied from interface: Matrix3D
      Check if the matrix contains a slice name
      Specified by:
      containsSliceName in interface Matrix3D<R,C,S,V>
      Returns:
      true if the matrix contains the slice name
    • getColIndexByName

      public final int getColIndexByName(Object s)
      Description copied from interface: Matrix3D
      Get the index of a column by name.
      Specified by:
      getColIndexByName in interface Matrix3D<R,C,S,V>
      Parameters:
      s - name
      Returns:
      column index
    • getColName

      public C getColName(int i)
      Description copied from interface: Matrix3D
      Get the column name for an index.
      Specified by:
      getColName in interface Matrix3D<R,C,S,V>
      Parameters:
      i - column index
      Returns:
      column name
    • getColNameIterator

      public Iterator<C> getColNameIterator()
      Specified by:
      getColNameIterator in interface Matrix3D<R,C,S,V>
    • getColNames

      public List<C> getColNames()
      Specified by:
      getColNames in interface Matrix3D<R,C,S,V>
      Returns:
      List of Object
    • getRowIndexByName

      public int getRowIndexByName(R s)
      Description copied from interface: Matrix3D
      Get the index of a row by name.
      Specified by:
      getRowIndexByName in interface Matrix3D<R,C,S,V>
      Parameters:
      s - name
      Returns:
      row index
    • getRowName

      public R getRowName(int i)
      Description copied from interface: Matrix3D
      Get the row name for an index
      Specified by:
      getRowName in interface Matrix3D<R,C,S,V>
      Parameters:
      i - row index
      Returns:
      name of the row
    • getRowNameIterator

      public Iterator<R> getRowNameIterator()
      Specified by:
      getRowNameIterator in interface Matrix3D<R,C,S,V>
      Returns:
      java.util.Iterator
    • getRowNames

      public List<R> getRowNames()
      Specified by:
      getRowNames in interface Matrix3D<R,C,S,V>
      Returns:
      List of Object
    • getSliceIndexByName

      public int getSliceIndexByName(S s)
      Description copied from interface: Matrix3D
      Get a slice index
      Specified by:
      getSliceIndexByName in interface Matrix3D<R,C,S,V>
      Parameters:
      s - name
      Returns:
      slice index
    • getSliceName

      public S getSliceName(int i)
      Description copied from interface: Matrix3D
      Get a slice name
      Specified by:
      getSliceName in interface Matrix3D<R,C,S,V>
      Parameters:
      i - index
      Returns:
      slice name
    • getSliceNameIterator

      public Iterator<S> getSliceNameIterator()
      Specified by:
      getSliceNameIterator in interface Matrix3D<R,C,S,V>
    • getSliceNames

      public List<S> getSliceNames()
      Specified by:
      getSliceNames in interface Matrix3D<R,C,S,V>
    • hasColNames

      public boolean hasColNames()
      Description copied from interface: Matrix3D
      Check if this matrix has a valid set of column names.
      Specified by:
      hasColNames in interface Matrix3D<R,C,S,V>
      Returns:
      boolean
    • hasRow

      public boolean hasRow(Object r)
      Specified by:
      hasRow in interface Matrix3D<R,C,S,V>
      Parameters:
      r - row name
      Returns:
      whether the row exists
    • hasRowNames

      public boolean hasRowNames()
      Specified by:
      hasRowNames in interface Matrix3D<R,C,S,V>
      Returns:
      boolean
    • hasSliceNames

      public boolean hasSliceNames()
      Specified by:
      hasSliceNames in interface Matrix3D<R,C,S,V>
    • isMissing

      public abstract boolean isMissing(int slice, int row, int col)
      Description copied from interface: Matrix3D
      Check if the value at a given index is missing.
      Specified by:
      isMissing in interface Matrix3D<R,C,S,V>
      Parameters:
      slice -
      row -
      col -
      Returns:
      true if the value is missing, false otherwise.
    • numMissing

      public abstract int numMissing()
      Description copied from interface: Matrix3D
      Return the number of missing values in the matrix.
      Specified by:
      numMissing in interface Matrix3D<R,C,S,V>
      Returns:
      number missing
    • rows

      public abstract int rows()
      Description copied from interface: Matrix3D
      Get the number of rows the matrix has
      Specified by:
      rows in interface Matrix3D<R,C,S,V>
      Returns:
      int
    • setColumnNames

      public void setColumnNames(List<C> v)
      Specified by:
      setColumnNames in interface Matrix3D<R,C,S,V>
      Parameters:
      v - List a vector of Strings.
    • setRowNames

      public void setRowNames(List<R> v)
      Specified by:
      setRowNames in interface Matrix3D<R,C,S,V>
      Parameters:
      v - List a vector of Strings.
    • setSliceNames

      public void setSliceNames(List<S> v)
      Specified by:
      setSliceNames in interface Matrix3D<R,C,S,V>
    • slices

      public abstract int slices()
      Specified by:
      slices in interface Matrix3D<R,C,S,V>