Record Class AggregatedVector
java.lang.Object
java.lang.Record
com.apple.foundationdb.async.common.AggregatedVector
- Record Components:
partialCount- count aggregate to indicate how many vectors have been aggregated to formpartialVectorpartialVector- the vector aggregate (mostly the sum of all individual vectors)
public record AggregatedVector(int partialCount, @Nonnull Transformed<RealVector> partialVector)
extends Record
A record-like class wrapping a
RealVector and a count. This data structure is used to keep a running sum
of many vectors in order to compute their centroid at a later time.-
Constructor Summary
ConstructorsConstructorDescriptionAggregatedVector(int partialCount, Transformed<RealVector> partialVector) Creates an instance of aAggregatedVectorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thepartialCountrecord component.Returns the value of thepartialVectorrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
AggregatedVector
Creates an instance of aAggregatedVectorrecord class.- Parameters:
partialCount- the value for thepartialCountrecord componentpartialVector- the value for thepartialVectorrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
partialCount
public int partialCount()Returns the value of thepartialCountrecord component.- Returns:
- the value of the
partialCountrecord component
-
partialVector
Returns the value of thepartialVectorrecord component.- Returns:
- the value of the
partialVectorrecord component
-