Class VectorReader
java.lang.Object
uk.co.parnmatt.vector.reader.VectorReader
Composes a reader over binary encoded vectors, choosing a Source, a buffering strategy,
and the element type to decode.
try (CloseableIterator<float[]> vectors = VectorReader.from(Source.file(path))
.fixed(Buffers.heap(1 << 16))
.as(ElementType.FLOAT32)) {
...
}
- Since:
- 0.4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe choice of how bytes are buffered as records are read.static final classThe choice of element type to decode each vector into. -
Method Summary
Modifier and TypeMethodDescriptionstatic VectorReader.BufferingBegin composing a reader over the given source.
-
Method Details
-
from
Begin composing a reader over the given source.- Parameters:
source- the source of binary encoded vector bytes- Returns:
- the choice of buffering strategy
-