Class ValueEpsilonEqualizers.FloatingPointEpsilonEqualizer
java.lang.Object
org.apache.arrow.vector.compare.util.ValueEpsilonEqualizers.FloatingPointEpsilonEqualizer
- All Implemented Interfaces:
Cloneable
,VectorValueEqualizer<FloatingPointVector>
- Enclosing class:
- ValueEpsilonEqualizers
public static class ValueEpsilonEqualizers.FloatingPointEpsilonEqualizer
extends Object
implements VectorValueEqualizer<FloatingPointVector>
Difference function for floating point values.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a equalizer of the same type.final boolean
valuesEqual
(FloatingPointVector vector1, int index1, FloatingPointVector vector2, int index2) Checks if the vectors are equal at the given positions, given that the values at both positions are non-null.
-
Constructor Details
-
FloatingPointEpsilonEqualizer
public FloatingPointEpsilonEqualizer(double epsilon)
-
-
Method Details
-
valuesEqual
public final boolean valuesEqual(FloatingPointVector vector1, int index1, FloatingPointVector vector2, int index2) Description copied from interface:VectorValueEqualizer
Checks if the vectors are equal at the given positions, given that the values at both positions are non-null.- Specified by:
valuesEqual
in interfaceVectorValueEqualizer<FloatingPointVector>
- Parameters:
vector1
- the first vector.index1
- index in the first vector.vector2
- the second vector.index2
- index in the second vector.- Returns:
- true if the two values are considered to be equal, and false otherwise.
-
clone
Description copied from interface:VectorValueEqualizer
Creates a equalizer of the same type.- Specified by:
clone
in interfaceVectorValueEqualizer<FloatingPointVector>
- Overrides:
clone
in classObject
- Returns:
- the newly created equalizer.
-