Package org.tribuo.math.la
Class VectorTuple
java.lang.Object
org.tribuo.math.la.VectorTuple
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
-
Constructor Summary
ConstructorDescriptionCreates an empty vector tuple.VectorTuple
(int index, int value) Creates a vector tuple with the specified values. -
Method Summary
-
Field Details
-
DELTA
public static final double DELTAThe tolerance for equality in value comparisons.- See Also:
-
index
public int indexThe current index. -
value
public double valueThe 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