Package com.hazelcast.vector
Interface VectorValues
- All Known Subinterfaces:
VectorValues.MultiIndexVectorValues
,VectorValues.SingleVectorValues
A
VectorValues
instance contains the vectors that describe a VectorDocument
.
VectorValues
may come in different forms:
- When a single vector index is defined in a
VectorCollection
, then a plainfloat[]
can be used, as defined inVectorValues.SingleVectorValues
- When more than one vector index is defined, then the vector representation of a
VectorDocument
requires a mapping from index name to the associatedfloat[]
vector .
- Since:
- 5.5
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Provides a mapping from index name to vector, supplying vectors for aVectorCollection
with multiple indexes defined.static interface
Represents values of a single vector. -
Method Summary
Modifier and TypeMethodDescriptionstatic VectorValues
of
(float[] vector) Returns aVectorValues
object suitable for supplying a single vector to aVectorCollection
configured with one vector index.static VectorValues
Returns aVectorValues
object that represents a single named vector.static VectorValues
Returns aVectorValues
object that represents two mappings of index names to associated vectors.static VectorValues
Returns aVectorValues
object that represents the given mappings of index names to associated vectors.
-
Method Details
-
of
Returns aVectorValues
object suitable for supplying a single vector to aVectorCollection
configured with one vector index.- Parameters:
vector
- the vector- Returns:
- a
VectorValues
object representing the given vector
-
of
Returns aVectorValues
object that represents a single named vector.- Parameters:
indexName
- the index namevector
- the vector- Returns:
- a
VectorValues
representing the given vector with name.
-
of
Returns aVectorValues
object that represents two mappings of index names to associated vectors.- Parameters:
indexName1
- the first mapping's index namevector1
- the first mapping's vectorindexName2
- the second mapping's index namevector2
- the second mapping's vector- Returns:
- a
VectorValues
object with two index name to vector mappings.
-
of
Returns aVectorValues
object that represents the given mappings of index names to associated vectors.- Parameters:
indexNameToVector
- the index name to vector mappings- Returns:
- a
VectorValues
object populated with the given mappings.
-