Class SparseVector.Entry

java.lang.Object
dev.nm.algebra.linear.matrix.doubles.matrixtype.sparse.SparseVector.Entry
Enclosing class:
SparseVector

public static class SparseVector.Entry extends Object
This is an entry in a SparseVector.
  • Field Details

  • Constructor Details

    • Entry

      public Entry(int index, double value)
  • Method Details

    • index

      public int index()
      Gets the index of this entry in the sparse vector, counting from 1.
      Returns:
      the index
    • value

      public double value()
      Gets the value of this entry.
      Returns:
      the value
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object