Skip to content

Commit c8c5212

Browse files
committed
chore: minor code cleanup
1 parent 0f15774 commit c8c5212

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

engine/src/main/java/com/arcadedb/query/sql/function/vector/SparseVector.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,20 @@
1818
*/
1919
package 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
*/
3332
public 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.

0 commit comments

Comments
 (0)