Class SparseMatrix.Entry

java.lang.Object
smile.math.matrix.fp32.SparseMatrix.Entry
Enclosing class:
SparseMatrix

public class SparseMatrix.Entry extends Object
Encapsulates an entry in a matrix for use in streaming. As typical stream object, this object is immutable. But we can update the corresponding value in the matrix through update method. This provides an efficient way to update the non-zero entries of a sparse matrix.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The row index.
    final int
    The index to the matrix storage.
    final int
    The column index.
    final float
    The value.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    update(float value)
    Update the entry value in the matrix.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • i

      public final int i
      The row index.
    • j

      public final int j
      The column index.
    • x

      public final float x
      The value.
    • index

      public final int index
      The index to the matrix storage.
  • Method Details

    • update

      public void update(float value)
      Update the entry value in the matrix. Note that the field value is final and thus not updated.
      Parameters:
      value - the new entry value.
    • toString

      public String toString()
      Overrides:
      toString in class Object