Package com.apple.foundationdb.linear
Class StoredVecsIterator<N extends Number,T>
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<T>
com.apple.foundationdb.linear.StoredVecsIterator<N,T>
- Type Parameters:
N- the component type of the vectors which must extendsNumberT- the type of object this iterator creates and uses to represent a stored vector in memory
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
StoredVecsIterator.StoredFVecsIterator,StoredVecsIterator.StoredIVecsIterator
public abstract class StoredVecsIterator<N extends Number,T>
extends com.google.common.collect.AbstractIterator<T>
Abstract iterator implementation to read the IVecs/FVecs data format that is used by publicly available
embedding datasets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classIterator to read floating point vectors from aFileChannelproviding an iterator ofDoubleRealVectors.static classIterator to read vectors from aFileChannelinto a list of integers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Tprotected abstract N[]newComponentArray(int size) protected abstract NtoComponent(ByteBuffer byteBuffer) protected abstract TMethods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peekMethods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
StoredVecsIterator
-
-
Method Details
-
newComponentArray
-
toComponent
-
toTarget
-
computeNext
- Specified by:
computeNextin classcom.google.common.collect.AbstractIterator<T>
-