A B C D E F G H I J L M N O P R S T U V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- add(int) - Method in class com.github.jelmerk.knn.util.ArrayBitSet
-
Adds the id to the set.
- add(int) - Method in interface com.github.jelmerk.knn.util.BitSet
-
Adds the id to the set.
- add(int) - Method in class com.github.jelmerk.knn.util.SynchronizedBitSet
-
Adds the id to the set.
- add(TItem) - Method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Add a new item to the index.
- add(TItem) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Add a new item to the index.
- add(TItem) - Method in interface com.github.jelmerk.knn.Index
-
Add a new item to the index.
- add(TItem) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Add a new item to the index.
- addAll(Collection<TItem>) - Method in interface com.github.jelmerk.knn.Index
-
Add multiple items to the index
- addAll(Collection<TItem>) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Add multiple items to the index
- addAll(Collection<TItem>, int, ProgressListener, int) - Method in interface com.github.jelmerk.knn.Index
-
Add multiple items to the index.
- addAll(Collection<TItem>, int, ProgressListener, int) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Add multiple items to the index.
- addAll(Collection<TItem>, ProgressListener) - Method in interface com.github.jelmerk.knn.Index
-
Add multiple items to the index.
- addAll(Collection<TItem>, ProgressListener) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Add multiple items to the index.
- ArrayBitSet - Class in com.github.jelmerk.knn.util
-
Bitset.
- ArrayBitSet(int) - Constructor for class com.github.jelmerk.knn.util.ArrayBitSet
-
Initializes a new instance of the
ArrayBitSet
class. - asExactIndex() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Creates a read only view on top of this index that uses pairwise comparision when doing distance search.
B
- BitSet - Interface in com.github.jelmerk.knn.util
- borrowObject() - Method in class com.github.jelmerk.knn.util.GenericObjectPool
-
Borrows an object from the pool.
- BruteForceIndex<TId,TVector,TItem extends Item<TId,TVector>,TDistance> - Class in com.github.jelmerk.knn.bruteforce
-
Implementation of
Index
that does pairwise comparison and as such can be used as a baseline for measuring approximate nearest neighbors index precision. - BruteForceIndex.Builder<TVector,TDistance> - Class in com.github.jelmerk.knn.bruteforce
-
Builder for initializing an
BruteForceIndex
instance. - build() - Method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex.Builder
-
Builds the BruteForceIndex instance.
- build() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex.Builder
-
Build the index that uses java object serializers to store the items when reading and writing the index.
- build() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex.RefinedBuilder
-
Build the index.
C
- CleanUp - Class in <Unnamed>
- CleanUp() - Constructor for class CleanUp
- clear() - Method in class com.github.jelmerk.knn.util.ArrayBitSet
-
Clears the set.
- clear() - Method in interface com.github.jelmerk.knn.util.BitSet
-
Clears the set.
- clear() - Method in class com.github.jelmerk.knn.util.SynchronizedBitSet
-
Clears the set.
- com.github.jelmerk.knn - package com.github.jelmerk.knn
- com.github.jelmerk.knn.bruteforce - package com.github.jelmerk.knn.bruteforce
- com.github.jelmerk.knn.hnsw - package com.github.jelmerk.knn.hnsw
- com.github.jelmerk.knn.statistics - package com.github.jelmerk.knn.statistics
- com.github.jelmerk.knn.util - package com.github.jelmerk.knn.util
- compareTo(SearchResult<TItem, TDistance>) - Method in class com.github.jelmerk.knn.SearchResult
- contains(int) - Method in class com.github.jelmerk.knn.util.ArrayBitSet
-
Checks whether the id is already in the set.
- contains(int) - Method in interface com.github.jelmerk.knn.util.BitSet
-
Checks whether the id is already in the set.
- contains(int) - Method in class com.github.jelmerk.knn.util.SynchronizedBitSet
-
Checks whether the id is already in the set.
- cosineDistance(double[], double[]) - Static method in class com.github.jelmerk.knn.DoubleDistanceFunctions
-
Calculates cosine distance on a float array.
- cosineDistance(float[], float[]) - Static method in class com.github.jelmerk.knn.FloatDistanceFunctions
-
Calculates cosine distance on a float array.
D
- DEFAULT_EF - Static variable in class com.github.jelmerk.knn.hnsw.HnswIndex.BuilderBase
- DEFAULT_EF_CONSTRUCTION - Static variable in class com.github.jelmerk.knn.hnsw.HnswIndex.BuilderBase
- DEFAULT_M - Static variable in class com.github.jelmerk.knn.hnsw.HnswIndex.BuilderBase
- DEFAULT_NUM_SAMPLES - Static variable in class com.github.jelmerk.knn.statistics.StatisticsDecorator
- DEFAULT_PROGRESS_UPDATE_INTERVAL - Static variable in interface com.github.jelmerk.knn.Index
-
By default after indexing this many items progress will be reported to registered progress listeners.
- DEFAULT_REMOVE_ENABLED - Static variable in class com.github.jelmerk.knn.hnsw.HnswIndex.BuilderBase
- distance() - Method in class com.github.jelmerk.knn.SearchResult
-
Returns the distance from the search query.
- distance(TVector, TVector) - Method in interface com.github.jelmerk.knn.DistanceFunction
-
Gets the distance between 2 items.
- DistanceFunction<TVector,TDistance> - Interface in com.github.jelmerk.knn
-
Calculates distance between 2 vectors.
- DoubleDistanceFunctions - Class in com.github.jelmerk.knn
-
Various distance metrics.
E
- equals(Object) - Method in class com.github.jelmerk.knn.SearchResult
- equals(Object) - Method in class com.github.jelmerk.knn.statistics.IndexStats
F
- findNearest(TVector, int) - Method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Find the items closest to the passed in vector.
- findNearest(TVector, int) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Find the items closest to the passed in vector.
- findNearest(TVector, int) - Method in interface com.github.jelmerk.knn.Index
-
Find the items closest to the passed in vector.
- findNearest(TVector, int) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Find the items closest to the passed in vector.
- findNeighbors(TId, int) - Method in interface com.github.jelmerk.knn.Index
-
Find the items closest to the item identified by the passed in id.
- findNeighbors(TId, int) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Find the items closest to the item identified by the passed in id.
- FloatDistanceFunctions - Class in com.github.jelmerk.knn
-
Various distance metrics.
G
- GenericObjectPool<T> - Class in com.github.jelmerk.knn.util
-
Generic object pool.
- GenericObjectPool(Supplier<T>, int) - Constructor for class com.github.jelmerk.knn.util.GenericObjectPool
-
Constructs a new pool
- get(TId) - Method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Returns an item by its identifier.
- get(TId) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns an item by its identifier.
- get(TId) - Method in interface com.github.jelmerk.knn.Index
-
Returns an item by its identifier.
- get(TId) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Returns an item by its identifier.
- getDistanceComparator() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns the comparator used to compare distances.
- getDistanceFunction() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns the distance function.
- getEf() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
The size of the dynamic list for the nearest neighbors (used during the search)
- getEfConstruction() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns the parameter has the same meaning as ef, but controls the index time / index precision.
- getItemIdSerializer() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns the serializer used to serialize item id's when saving the index.
- getItemSerializer() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns the serializer used to serialize items when saving the index.
- getM() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns the number of bi-directional links created for every new element during construction.
- getMaxItemCount() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns the maximum number of items the index can hold.
H
- hash32(byte[]) - Static method in class com.github.jelmerk.knn.util.Murmur3
-
Murmur3 32-bit variant.
- hash32(byte[], int, int, int) - Static method in class com.github.jelmerk.knn.util.Murmur3
-
Murmur3 32-bit variant.
- hashCode() - Method in class com.github.jelmerk.knn.SearchResult
- hashCode() - Method in class com.github.jelmerk.knn.statistics.IndexStats
- HnswIndex<TId,TVector,TItem extends Item<TId,TVector>,TDistance> - Class in com.github.jelmerk.knn.hnsw
-
Implementation of
Index
that implements the hnsw algorithm. - HnswIndex.Builder<TVector,TDistance> - Class in com.github.jelmerk.knn.hnsw
-
Builder for initializing an
HnswIndex
instance. - HnswIndex.BuilderBase<TBuilder extends HnswIndex.BuilderBase<TBuilder,TVector,TDistance>,TVector,TDistance> - Class in com.github.jelmerk.knn.hnsw
-
Base class for HNSW index builders.
- HnswIndex.RefinedBuilder<TId,TVector,TItem extends Item<TId,TVector>,TDistance> - Class in com.github.jelmerk.knn.hnsw
-
Extension of
HnswIndex.Builder
that has knows what type of item is going to be stored in the index.
I
- id() - Method in interface com.github.jelmerk.knn.Item
-
Returns the identifier of this item.
- Index<TId,TVector,TItem extends Item<TId,TVector>,TDistance> - Interface in com.github.jelmerk.knn
-
Read write K-nearest neighbors search index.
- IndexException - Exception in com.github.jelmerk.knn
-
Base class for exceptions thrown by
Index
implementations. - IndexException() - Constructor for exception com.github.jelmerk.knn.IndexException
-
Constructs an IndexException
- IndexException(String) - Constructor for exception com.github.jelmerk.knn.IndexException
-
Constructs a IndexException with the specified detail message.
- IndexException(String, Throwable) - Constructor for exception com.github.jelmerk.knn.IndexException
-
Constructs a IndexException with the specified detail message and cause.
- IndexStats - Class in com.github.jelmerk.knn.statistics
-
Holds statistics about the index.
- IndexStats(double) - Constructor for class com.github.jelmerk.knn.statistics.IndexStats
-
Constructs a new IndexStats instance.
- innerProduct(double[], double[]) - Static method in class com.github.jelmerk.knn.DoubleDistanceFunctions
-
Calculates inner product.
- innerProduct(float[], float[]) - Static method in class com.github.jelmerk.knn.FloatDistanceFunctions
-
Calculates inner product.
- INSTANCE - Static variable in class com.github.jelmerk.knn.NullProgressListener
-
Singleton instance of
NullProgressListener
. - isRemoveEnabled() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns if removes are enabled.
- item() - Method in class com.github.jelmerk.knn.SearchResult
-
Returns the item.
- Item<TId,TVector> - Interface in com.github.jelmerk.knn
-
Item that can be indexed.
- items() - Method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Returns all items in the index.
- items() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns all items in the index.
- items() - Method in interface com.github.jelmerk.knn.Index
-
Returns all items in the index.
- items() - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Returns all items in the index.
J
- JavaObjectSerializer<T> - Class in com.github.jelmerk.knn.hnsw
-
Implementation of
ObjectSerializer
that uses java serialization to write the value. - JavaObjectSerializer() - Constructor for class com.github.jelmerk.knn.hnsw.JavaObjectSerializer
L
- load(File) - Static method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Restores a
BruteForceIndex
from a File. - load(File) - Static method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Restores a
HnswIndex
from a File. - load(InputStream) - Static method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Restores a
BruteForceIndex
from an InputStream. - load(InputStream) - Static method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Restores a
HnswIndex
from an InputStream. - load(Path) - Static method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Restores a
BruteForceIndex
from a Path. - load(Path) - Static method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Restores a
HnswIndex
from a Path.
M
- magnitude(float[]) - Static method in class com.github.jelmerk.knn.util.VectorUtils
-
Calculates the magnitude of the vector.
- main(String[]) - Static method in class CleanUp
- Murmur3 - Class in com.github.jelmerk.knn.util
-
Murmur3 is successor to Murmur2 fast non-crytographic hash algorithms.
- Murmur3() - Constructor for class com.github.jelmerk.knn.util.Murmur3
N
- newBuilder(DistanceFunction<TVector, TDistance>) - Static method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
- newBuilder(DistanceFunction<TVector, TDistance>, int) - Static method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Start the process of building a new HNSW index.
- newBuilder(DistanceFunction<TVector, TDistance>, Comparator<TDistance>) - Static method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
- newBuilder(DistanceFunction<TVector, TDistance>, Comparator<TDistance>, int) - Static method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Start the process of building a new HNSW index.
- normalize(float[]) - Static method in class com.github.jelmerk.knn.util.VectorUtils
-
Turns vector to unit vector.
- NullProgressListener - Class in com.github.jelmerk.knn
-
Implementation of
ProgressListener
that does nothing.
O
- ObjectSerializer<T> - Interface in com.github.jelmerk.knn.hnsw
-
Implementations of this interface are used to customize how objects will be stored when the index is persisted
P
- precision() - Method in class com.github.jelmerk.knn.statistics.IndexStats
-
Precision of the index as a value between 0 and 1 where 1 means being correct 100% of the time and 0 means always being wrong.
- ProgressListener - Interface in com.github.jelmerk.knn
-
Callback interface for reporting on the progress of an index operation.
R
- read(ObjectInput) - Method in class com.github.jelmerk.knn.hnsw.JavaObjectSerializer
-
Reads an item from an ObjectOutput implementation.
- read(ObjectInput) - Method in interface com.github.jelmerk.knn.hnsw.ObjectSerializer
-
Reads an item from an ObjectOutput implementation.
- remove(int) - Method in class com.github.jelmerk.knn.util.ArrayBitSet
-
Removes a id from the set.
- remove(int) - Method in interface com.github.jelmerk.knn.util.BitSet
-
Removes a id from the set.
- remove(int) - Method in class com.github.jelmerk.knn.util.SynchronizedBitSet
-
Removes a id from the set.
- remove(TId, long) - Method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Removes an item from the index.
- remove(TId, long) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Removes an item from the index.
- remove(TId, long) - Method in interface com.github.jelmerk.knn.Index
-
Removes an item from the index.
- remove(TId, long) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Removes an item from the index.
- returnObject(T) - Method in class com.github.jelmerk.knn.util.GenericObjectPool
-
Returns an instance to the pool.
S
- save(File) - Method in interface com.github.jelmerk.knn.Index
-
Saves the index to a file.
- save(File) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Saves the index to a file.
- save(OutputStream) - Method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
- save(OutputStream) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Saves the index to an OutputStream.
- save(OutputStream) - Method in interface com.github.jelmerk.knn.Index
-
Saves the index to an OutputStream.
- save(OutputStream) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Saves the index to an OutputStream.
- save(Path) - Method in interface com.github.jelmerk.knn.Index
-
Saves the index to a path.
- save(Path) - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Saves the index to a path.
- SearchResult<TItem,TDistance> - Class in com.github.jelmerk.knn
-
Result of a nearest neighbour search.
- SearchResult(TItem, TDistance, Comparator<TDistance>) - Constructor for class com.github.jelmerk.knn.SearchResult
-
Constructs a new SearchResult instance.
- size() - Method in class com.github.jelmerk.knn.bruteforce.BruteForceIndex
-
Returns the size of the index.
- size() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex
-
Returns the size of the index.
- size() - Method in interface com.github.jelmerk.knn.Index
-
Returns the size of the index.
- size() - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Returns the size of the index.
- SizeLimitExceededException - Exception in com.github.jelmerk.knn.hnsw
-
Thrown to indicate the size of the index has been exceeded.
- SizeLimitExceededException(String) - Constructor for exception com.github.jelmerk.knn.hnsw.SizeLimitExceededException
-
Constructs a SizeLimitExceededException with the specified detail message.
- StatisticsDecorator<TId,TVector,TItem extends Item<TId,TVector>,TDistance> - Class in com.github.jelmerk.knn.statistics
-
Decorator on top of an index that will collect statistics about the index.
- StatisticsDecorator(Index<TId, TVector, TItem, TDistance>, Index<TId, TVector, TItem, TDistance>, int) - Constructor for class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Constructs a new StatisticsDecorator.
- StatisticsDecorator(Index<TId, TVector, TItem, TDistance>, Index<TId, TVector, TItem, TDistance>, int, int) - Constructor for class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Constructs a new StatisticsDecorator.
- stats() - Method in class com.github.jelmerk.knn.statistics.StatisticsDecorator
-
Returns the collected statistics for this index.
- SynchronizedBitSet - Class in com.github.jelmerk.knn.util
- SynchronizedBitSet(BitSet) - Constructor for class com.github.jelmerk.knn.util.SynchronizedBitSet
-
Constructs a new SynchronizedBitSet.
T
- toString() - Method in class com.github.jelmerk.knn.SearchResult
- toString() - Method in class com.github.jelmerk.knn.statistics.IndexStats
U
- updateProgress(int, int) - Method in class com.github.jelmerk.knn.NullProgressListener
-
Called by the index at set intervals to report progress of the indexing process.
- updateProgress(int, int) - Method in interface com.github.jelmerk.knn.ProgressListener
-
Called by the index at set intervals to report progress of the indexing process.
V
- vector() - Method in interface com.github.jelmerk.knn.Item
-
Returns the vector to perform the distance calculation on.
- VectorUtils - Class in com.github.jelmerk.knn.util
- version() - Method in interface com.github.jelmerk.knn.Item
-
Returns the version of the item.
- version() - Method in interface com.github.jelmerk.knn.Versioned
-
The version of the item.
- Versioned<TVersion extends Comparable<TVersion>> - Interface in com.github.jelmerk.knn
-
Items implementing this interface are versioned.
W
- withCustomSerializers(ObjectSerializer<TId>, ObjectSerializer<TItem>) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex.Builder
-
Register the serializers used when saving the index.
- withCustomSerializers(ObjectSerializer<TId>, ObjectSerializer<TItem>) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex.RefinedBuilder
-
Register the serializers used when saving the index.
- withEf(int) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex.BuilderBase
-
The size of the dynamic list for the nearest neighbors (used during the search).
- withEfConstruction(int) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex.BuilderBase
-
` The parameter has the same meaning as ef, but controls the index time / index precision.
- withM(int) - Method in class com.github.jelmerk.knn.hnsw.HnswIndex.BuilderBase
-
Sets the number of bi-directional links created for every new element during construction.
- withRemoveEnabled() - Method in class com.github.jelmerk.knn.hnsw.HnswIndex.BuilderBase
-
Call to enable support for the experimental remove operation.
- write(T, ObjectOutput) - Method in class com.github.jelmerk.knn.hnsw.JavaObjectSerializer
-
Writes the item to an ObjectOutput implementation.
- write(T, ObjectOutput) - Method in interface com.github.jelmerk.knn.hnsw.ObjectSerializer
-
Writes the item to an ObjectOutput implementation.
All Classes All Packages