Class Access2D.SelectionView<N extends Comparable<N>>

java.lang.Object
org.ojalgo.structure.Access2D.SelectionView<N>
All Implemented Interfaces:
Access1D<N>, Access2D<N>, Access2D.Collectable<N,Mutate2D>, Structure1D, Structure2D
Enclosing interface:
Access2D<N extends Comparable<N>>

public static final class Access2D.SelectionView<N extends Comparable<N>> extends Object implements Access2D<N>, Access2D.Collectable<N,Mutate2D>
  • Field Details

    • myColumns

      private final long[] myColumns
    • myFullData

      private final Access2D<N extends Comparable<N>> myFullData
    • myRows

      private final long[] myRows
  • Constructor Details

    • SelectionView

      SelectionView(Access2D<N> fullData, long[] rows, long[] columns)
  • Method Details

    • countColumns

      public long countColumns()
      Description copied from interface: Structure2D
      Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.
      Specified by:
      countColumns in interface Structure2D
      Returns:
      The number of columns
    • countRows

      public long countRows()
      Description copied from interface: Structure2D
      Only need to implement if the structure may contain more than Integer.MAX_VALUE elements.
      Specified by:
      countRows in interface Structure2D
      Returns:
      The number of rows
    • doubleValue

      public double doubleValue(int row, int col)
      Description copied from interface: Access2D
      Extracts one element of this matrix as a double.
      Specified by:
      doubleValue in interface Access2D<N extends Comparable<N>>
      Parameters:
      row - A row index.
      col - A column index.
      Returns:
      One matrix element
    • doubleValue

      public double doubleValue(long row, long col)
      Specified by:
      doubleValue in interface Access2D<N extends Comparable<N>>
    • get

      public N get(long row, long col)
      Specified by:
      get in interface Access2D<N extends Comparable<N>>
    • getColDim

      public int getColDim()
      Specified by:
      getColDim in interface Structure2D
      Returns:
      The number of columns
    • getRowDim

      public int getRowDim()
      Specified by:
      getRowDim in interface Structure2D
      Returns:
      The number of rows
    • supplyTo

      public void supplyTo(Mutate2D receiver)
      Specified by:
      supplyTo in interface Access2D.Collectable<N extends Comparable<N>,Mutate2D>
    • toString

      public String toString()
      Overrides:
      toString in class Object