File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
engine/src/main/java/com/arcadedb/query/sql/function/vector Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1818 */
1919package com .arcadedb .query .sql .function .vector ;
2020
21- import java .util .HashMap ;
22- import java .util .Map ;
21+ import java .util .*;
2322
2423/**
2524 * Represents a sparse vector using a map of non-zero indices to values.
2625 * Efficient for vectors with many zero values (typical in NLP and sparse embeddings like SPLADE).
27- *
26+ * <p>
2827 * Storage: Map<Integer, Float> where key=index, value=non-zero value
2928 * Supports dynamic dimensionality (dimension inferred from max index or explicitly set).
3029 *
3130 * @author Luca Garulli (l.garulli--(at)--gmail.com)
3231 */
3332public class SparseVector {
3433 private final Map <Integer , Float > values ;
35- private int dimensions ;
34+ private final int dimensions ;
3635
3736 /**
3837 * Create a sparse vector with explicit dimensions.
You can’t perform that action at this time.
0 commit comments