Commit c10d1dc
authored
[0.6] [MOD-10559] Decouple the shrinking and growing logic of large containers in Flat and HNSW (#783)
Enhance BruteForce index tests for resizing and alignment
- Refactor `resize_and_align_index` tests in both `test_bruteforce.cpp` and `test_bruteforce_multi.cpp` to improve clarity and maintainability.
- Introduce helper functions to verify index size and capacity, reducing code duplication.
- Add comprehensive checks for index size, capacity, and label counts during vector addition and deletion.
- Implement tests to ensure no oscillation in index size and capacity during repeated add/delete cycles.
- Address edge cases for initial capacity and resizing behavior, ensuring proper alignment with block sizes.1 parent 71bd103 commit c10d1dc
File tree
6 files changed
+623
-191
lines changed- src/VecSim/algorithms
- brute_force
- hnsw
- tests/unit
6 files changed
+623
-191
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
57 | 68 | | |
58 | 69 | | |
59 | 70 | | |
| |||
142 | 153 | | |
143 | 154 | | |
144 | 155 | | |
| 156 | + | |
| 157 | + | |
145 | 158 | | |
146 | | - | |
147 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
148 | 162 | | |
| 163 | + | |
149 | 164 | | |
150 | 165 | | |
151 | 166 | | |
| |||
196 | 211 | | |
197 | 212 | | |
198 | 213 | | |
199 | | - | |
| 214 | + | |
| 215 | + | |
200 | 216 | | |
201 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
202 | 220 | | |
203 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
204 | 226 | | |
| 227 | + | |
205 | 228 | | |
206 | 229 | | |
207 | 230 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| 21 | + | |
20 | 22 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | | - | |
1155 | | - | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
1156 | 1157 | | |
1157 | | - | |
| 1158 | + | |
| 1159 | + | |
1158 | 1160 | | |
1159 | 1161 | | |
1160 | 1162 | | |
| 1163 | + | |
1161 | 1164 | | |
1162 | 1165 | | |
1163 | 1166 | | |
| |||
0 commit comments