Package dev.embeddings4j
Class AbstractInMemoryVectorDatabase<VectorType extends Comparable<VectorType>>
java.lang.Object
dev.embeddings4j.AbstractInMemoryVectorDatabase<VectorType>
- Direct Known Subclasses:
InMemoryDoubleVectorDatabase,InMemoryFloatVectorDatabase
public abstract class AbstractInMemoryVectorDatabase<VectorType extends Comparable<VectorType>>
extends Object
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractInMemoryVectorDatabase(int dimensions, int maxSize, com.github.jelmerk.knn.DistanceFunction<List<VectorType>, VectorType> distanceFunction) -
Method Summary
Modifier and TypeMethodDescriptionexecute(SearchNearestQuery<VectorType> query) voidinsert(Embedding<VectorType> embedding) final voidinsert(Embedding<VectorType>... embeddings) voidinsertAll(Collection<Embedding<VectorType>> embeddings) intsize()
-
Constructor Details
-
AbstractInMemoryVectorDatabase
protected AbstractInMemoryVectorDatabase(int dimensions, int maxSize, com.github.jelmerk.knn.DistanceFunction<List<VectorType>, VectorType> distanceFunction)
-
-
Method Details
-
insert
-
insert
-
insertAll
- Throws:
InterruptedException
-
execute
-
size
public int size()
-