java.lang.Object
java.lang.Record
org.nasdanika.ai.SimilaritySearch.EmbeddingsItem
- All Implemented Interfaces:
com.github.jelmerk.hnswlib.core.Item<SimilaritySearch.IndexId,,float[]> Serializable
- Enclosing interface:
- SimilaritySearch<T,
D extends Comparable<D>>
public static record SimilaritySearch.EmbeddingsItem(SimilaritySearch.IndexId id, float[] vector, int dimensions)
extends Record
implements com.github.jelmerk.hnswlib.core.Item<SimilaritySearch.IndexId,float[]>
Vector index item
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEmbeddingsItem(SimilaritySearch.IndexId id, float[] vector, int dimensions) Creates an instance of aEmbeddingsItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thedimensionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.final StringtoString()Returns a string representation of this record class.float[]vector()Returns the value of thevectorrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.jelmerk.hnswlib.core.Item
version
-
Constructor Details
-
EmbeddingsItem
Creates an instance of aEmbeddingsItemrecord class.- Parameters:
id- the value for theidrecord componentvector- the value for thevectorrecord componentdimensions- the value for thedimensionsrecord 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
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 '=='. -
id
Returns the value of theidrecord component.- Specified by:
idin interfacecom.github.jelmerk.hnswlib.core.Item<SimilaritySearch.IndexId,float[]> - Returns:
- the value of the
idrecord component
-
vector
Returns the value of thevectorrecord component.- Specified by:
vectorin interfacecom.github.jelmerk.hnswlib.core.Item<SimilaritySearch.IndexId,float[]> - Returns:
- the value of the
vectorrecord component
-
dimensions
Returns the value of thedimensionsrecord component.- Specified by:
dimensionsin interfacecom.github.jelmerk.hnswlib.core.Item<SimilaritySearch.IndexId,float[]> - Returns:
- the value of the
dimensionsrecord component
-