Enum Class VectorShape
- All Implemented Interfaces:
Serializable, Comparable<VectorShape>, Constable
Declares how vector values are physically represented for persistence and database operations.
Use this with VectorStorage.shape() to align mapping and index configuration with the
capabilities of the target database.
See:
- Since:
- 5.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisSparse(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Resolves sparse storage intent fromVectorStorageannotation metadata.static VectorShapeReturns the enum constant of this class with the specified name.static VectorShape[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DENSE
Dense vectors store every dimension explicitly. -
SPARSE
Sparse vectors store only non-zero dimensions with their positions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isSparse
public static boolean isSparse(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata) Resolves sparse storage intent fromVectorStorageannotation metadata.- Parameters:
annotationMetadata- annotation metadata to inspect- Returns:
truewhen vector shape resolves toSPARSE, otherwisefalse
-