Module org.elasticsearch.server
Record Class CentroidAssignments
java.lang.Object
java.lang.Record
org.elasticsearch.index.codec.vectors.diskbbq.CentroidAssignments
public record CentroidAssignments(int numCentroids, float[][] centroids, int[] assignments, int[] overspillAssignments, float[] globalCentroid)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionCentroidAssignments(int dims, float[][] centroids, int[] assignments, int[] overspillAssignments) CentroidAssignments(int numCentroids, float[][] centroids, int[] assignments, int[] overspillAssignments, float[] globalCentroid) Creates an instance of aCentroidAssignmentsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionint[]Returns the value of theassignmentsrecord component.float[][]Returns the value of thecentroidsrecord component.final booleanIndicates whether some other object is "equal to" this one.float[]Returns the value of theglobalCentroidrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thenumCentroidsrecord component.int[]Returns the value of theoverspillAssignmentsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CentroidAssignments
public CentroidAssignments(int dims, float[][] centroids, int[] assignments, int[] overspillAssignments) -
CentroidAssignments
public CentroidAssignments(int numCentroids, float[][] centroids, int[] assignments, int[] overspillAssignments, float[] globalCentroid) Creates an instance of aCentroidAssignmentsrecord class.- Parameters:
numCentroids- the value for thenumCentroidsrecord componentcentroids- the value for thecentroidsrecord componentassignments- the value for theassignmentsrecord componentoverspillAssignments- the value for theoverspillAssignmentsrecord componentglobalCentroid- the value for theglobalCentroidrecord 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 '=='. -
numCentroids
public int numCentroids()Returns the value of thenumCentroidsrecord component.- Returns:
- the value of the
numCentroidsrecord component
-
centroids
public float[][] centroids()Returns the value of thecentroidsrecord component.- Returns:
- the value of the
centroidsrecord component
-
assignments
public int[] assignments()Returns the value of theassignmentsrecord component.- Returns:
- the value of the
assignmentsrecord component
-
overspillAssignments
public int[] overspillAssignments()Returns the value of theoverspillAssignmentsrecord component.- Returns:
- the value of the
overspillAssignmentsrecord component
-
globalCentroid
public float[] globalCentroid()Returns the value of theglobalCentroidrecord component.- Returns:
- the value of the
globalCentroidrecord component
-