Class VectorTuple

java.lang.Object
org.tribuo.math.la.VectorTuple

public class VectorTuple extends Object
A mutable tuple used to avoid allocation when iterating a vector.

It's basically a cursor into a vector.

While it does implement hashcode, don't use it as a key as the hashcode is data dependent.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    The tolerance for equality in value comparisons.
    int
    The current index.
    double
    The current value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an empty vector tuple.
    VectorTuple(int index, int value)
    Creates a vector tuple with the specified values.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
     

    Methods inherited from class java.lang.Object

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

    • DELTA

      public static final double DELTA
      The tolerance for equality in value comparisons.
      See Also:
    • index

      public int index
      The current index.
    • value

      public double value
      The current value.
  • Constructor Details

    • VectorTuple

      public VectorTuple()
      Creates an empty vector tuple.
    • VectorTuple

      public VectorTuple(int index, int value)
      Creates a vector tuple with the specified values.
      Parameters:
      index - The current index.
      value - The current value.
  • Method Details