Class ColumnsStore<N extends Comparable<N>>

All Implemented Interfaces:
Group, Group.Additive<MatrixStore<N>>, NormedVectorSpace<MatrixStore<N>,N>, Operation, Operation.Addition<MatrixStore<N>>, Operation.Multiplication<MatrixStore<N>>, Operation.Subtraction<MatrixStore<N>>, ScalarOperation, ScalarOperation.Addition<MatrixStore<N>,N>, ScalarOperation.Division<MatrixStore<N>,N>, ScalarOperation.Multiplication<MatrixStore<N>,N>, ScalarOperation.Subtraction<MatrixStore<N>,N>, VectorSpace<MatrixStore<N>,N>, Matrix2D<N,MatrixStore<N>>, ElementsSupplier<N>, MatrixStore<N>, Access1D<N>, Access1D.Aggregatable<N>, Access1D.Sliceable<N>, Access1D.Visitable<N>, Access2D<N>, Access2D.Aggregatable<N>, Access2D.Collectable<N,TransformableRegion<N>>, Access2D.Sliceable<N>, Access2D.Visitable<N>, Operate2D<N,ElementsSupplier<N>>, Structure1D, Structure2D, Structure2D.Logical<Access2D<N>,MatrixStore<N>>, Structure2D.ReducibleTo1D<ElementsSupplier<N>>

final class ColumnsStore<N extends Comparable<N>> extends SelectingStore<N>
A selection (re-ordering) of columns.
  • Field Details

    • myColumns

      private final int[] myColumns
  • Constructor Details

    • ColumnsStore

      ColumnsStore(MatrixStore<N> base, int[] columns)
  • Method Details

    • doubleValue

      public double doubleValue(int row, int col)
      Description copied from interface: Access2D
      Extracts one element of this matrix as a double.
      Parameters:
      row - A row index.
      col - A column index.
      Returns:
      One matrix element
    • firstInColumn

      public int firstInColumn(int col)
      Description copied from interface: Structure2D
      The default value is simply 0, and if all elements are zeros then this.countRows().
      Parameters:
      col - The column index
      Returns:
      The row index of the first non-zero element in the specified column
    • get

      public N get(int row, int col)
    • limitOfColumn

      public int limitOfColumn(int col)
      Description copied from interface: Structure2D
      The default value is simply this.countRows(), and if all elements are zeros then 0.
      Specified by:
      limitOfColumn in interface Structure2D
      Overrides:
      limitOfColumn in class AbstractStore<N extends Comparable<N>>
      Returns:
      The row index of the first zero element, after all non-zeros, in the specified column (index of the last non-zero + 1)
    • supplyTo

      public void supplyTo(TransformableRegion<N> consumer)
    • toScalar

      public Scalar<N> toScalar(int row, int col)
      Description copied from interface: Matrix2D
      Extracts one element of this matrix as a Scalar.
      Parameters:
      row - A row index.
      col - A column index.
      Returns:
      One matrix element as a Scalar.
    • toBaseIndex

      private int toBaseIndex(int col)
    • toBaseIndex

      private int toBaseIndex(long col)