Class SparseMutator2D<N extends Comparable<N>,M extends BasicMatrix<N,M>>

java.lang.Object
org.ojalgo.matrix.SparseMutator2D<N,M>
All Implemented Interfaces:
Factory2D.Builder<M>, Mutate1D, Mutate2D, Structure1D, Structure2D
Direct Known Subclasses:
MatrixC128.SparseReceiver, MatrixH256.SparseReceiver, MatrixQ128.SparseReceiver, MatrixR032.SparseReceiver, MatrixR064.SparseReceiver, MatrixR128.SparseReceiver

abstract class SparseMutator2D<N extends Comparable<N>,M extends BasicMatrix<N,M>> extends Object implements Factory2D.Builder<M>
  • Field Details

  • Constructor Details

  • Method Details

    • build

      public M build()
      Specified by:
      build in interface Factory2D.Builder<N extends Comparable<N>>
    • count

      public long count()
      Description copied from interface: Structure2D
      count() == countRows() * countColumns()
      Specified by:
      count in interface Structure1D
      Specified by:
      count in interface Structure2D
    • 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
    • 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
    • reset

      public void reset()
      Description copied from interface: Mutate1D
      Reset this mutable structure to some standard (all zeros) initial state. It must still be usuable after this call, and the structure/size/shape must not change.
      Specified by:
      reset in interface Mutate1D
    • set

      public void set(int row, int col, double value)
      Specified by:
      set in interface Mutate2D
    • set

      public void set(long index, double value)
      Specified by:
      set in interface Mutate1D
      Specified by:
      set in interface Mutate2D
    • set

      public void set(long row, long col, Comparable<?> value)
      Specified by:
      set in interface Mutate2D
    • size

      public int size()
      Description copied from interface: Structure2D
      size() == getRowDim() * getColDim()
      Specified by:
      size in interface Structure1D
      Specified by:
      size in interface Structure2D
    • instantiate

      abstract M instantiate(MatrixStore<N> store)