@@ -91,7 +91,6 @@ public class HNSW {
91
91
public static final int DEFAULT_M = 16 ;
92
92
public static final int DEFAULT_M_MAX = DEFAULT_M ;
93
93
public static final int DEFAULT_M_MAX_0 = 2 * DEFAULT_M ;
94
- public static final int DEFAULT_EF_SEARCH = 100 ;
95
94
public static final int DEFAULT_EF_CONSTRUCTION = 200 ;
96
95
public static final boolean DEFAULT_EXTEND_CANDIDATES = false ;
97
96
public static final boolean DEFAULT_KEEP_PRUNED_CONNECTIONS = false ;
@@ -123,7 +122,6 @@ public static class Config {
123
122
private final int m ;
124
123
private final int mMax ;
125
124
private final int mMax0 ;
126
- private final int efSearch ;
127
125
private final int efConstruction ;
128
126
private final boolean extendCandidates ;
129
127
private final boolean keepPrunedConnections ;
@@ -135,22 +133,20 @@ protected Config() {
135
133
this .m = DEFAULT_M ;
136
134
this .mMax = DEFAULT_M_MAX ;
137
135
this .mMax0 = DEFAULT_M_MAX_0 ;
138
- this .efSearch = DEFAULT_EF_SEARCH ;
139
136
this .efConstruction = DEFAULT_EF_CONSTRUCTION ;
140
137
this .extendCandidates = DEFAULT_EXTEND_CANDIDATES ;
141
138
this .keepPrunedConnections = DEFAULT_KEEP_PRUNED_CONNECTIONS ;
142
139
}
143
140
144
141
protected Config (@ Nonnull final Random random , @ Nonnull final Metric metric , final boolean useInlining ,
145
- final int m , final int mMax , final int mMax0 , final int efSearch , final int efConstruction ,
142
+ final int m , final int mMax , final int mMax0 , final int efConstruction ,
146
143
final boolean extendCandidates , final boolean keepPrunedConnections ) {
147
144
this .random = random ;
148
145
this .metric = metric ;
149
146
this .useInlining = useInlining ;
150
147
this .m = m ;
151
148
this .mMax = mMax ;
152
149
this .mMax0 = mMax0 ;
153
- this .efSearch = efSearch ;
154
150
this .efConstruction = efConstruction ;
155
151
this .extendCandidates = extendCandidates ;
156
152
this .keepPrunedConnections = keepPrunedConnections ;
@@ -182,10 +178,6 @@ public int getMMax0() {
182
178
return mMax0 ;
183
179
}
184
180
185
- public int getEfSearch () {
186
- return efSearch ;
187
- }
188
-
189
181
public int getEfConstruction () {
190
182
return efConstruction ;
191
183
}
@@ -201,15 +193,15 @@ public boolean isKeepPrunedConnections() {
201
193
@ Nonnull
202
194
public ConfigBuilder toBuilder () {
203
195
return new ConfigBuilder (getRandom (), getMetric (), isUseInlining (), getM (), getMMax (), getMMax0 (),
204
- getEfSearch (), getEfConstruction (), isExtendCandidates (), isKeepPrunedConnections ());
196
+ getEfConstruction (), isExtendCandidates (), isKeepPrunedConnections ());
205
197
}
206
198
207
199
@ Override
208
200
@ Nonnull
209
201
public String toString () {
210
202
return "Config[metric=" + getMetric () + "isUseInlining" + isUseInlining () + "M=" + getM () +
211
- " , MMax=" + getMMax () + " , MMax0=" + getMMax0 () + ", efSearch =" + getEfSearch () +
212
- ", efConstruction=" + getEfConstruction () + ", isExtendCandidates=" + isExtendCandidates () +
203
+ " , MMax=" + getMMax () + " , MMax0=" + getMMax0 () + ", efConstruction =" + getEfConstruction () +
204
+ ", isExtendCandidates=" + isExtendCandidates () +
213
205
", isKeepPrunedConnections=" + isKeepPrunedConnections () + "]" ;
214
206
}
215
207
}
@@ -230,7 +222,6 @@ public static class ConfigBuilder {
230
222
private int m = DEFAULT_M ;
231
223
private int mMax = DEFAULT_M_MAX ;
232
224
private int mMax0 = DEFAULT_M_MAX_0 ;
233
- private int efSearch = DEFAULT_EF_SEARCH ;
234
225
private int efConstruction = DEFAULT_EF_CONSTRUCTION ;
235
226
private boolean extendCandidates = DEFAULT_EXTEND_CANDIDATES ;
236
227
private boolean keepPrunedConnections = DEFAULT_KEEP_PRUNED_CONNECTIONS ;
@@ -239,15 +230,14 @@ public ConfigBuilder() {
239
230
}
240
231
241
232
public ConfigBuilder (@ Nonnull final Random random , @ Nonnull final Metric metric , final boolean useInlining ,
242
- final int m , final int mMax , final int mMax0 , final int efSearch , final int efConstruction ,
233
+ final int m , final int mMax , final int mMax0 , final int efConstruction ,
243
234
final boolean extendCandidates , final boolean keepPrunedConnections ) {
244
235
this .random = random ;
245
236
this .metric = metric ;
246
237
this .useInlining = useInlining ;
247
238
this .m = m ;
248
239
this .mMax = mMax ;
249
240
this .mMax0 = mMax0 ;
250
- this .efSearch = efSearch ;
251
241
this .efConstruction = efConstruction ;
252
242
this .extendCandidates = extendCandidates ;
253
243
this .keepPrunedConnections = keepPrunedConnections ;
@@ -314,15 +304,6 @@ public ConfigBuilder setMMax0(final int mMax0) {
314
304
return this ;
315
305
}
316
306
317
- public int getEfSearch () {
318
- return efSearch ;
319
- }
320
-
321
- public ConfigBuilder setEfSearch (final int efSearch ) {
322
- this .efSearch = efSearch ;
323
- return this ;
324
- }
325
-
326
307
public int getEfConstruction () {
327
308
return efConstruction ;
328
309
}
@@ -351,7 +332,7 @@ public ConfigBuilder setKeepPrunedConnections(final boolean keepPrunedConnection
351
332
}
352
333
353
334
public Config build () {
354
- return new Config (getRandom (), getMetric (), isUseInlining (), getM (), getMMax (), getMMax0 (), getEfSearch (),
335
+ return new Config (getRandom (), getMetric (), isUseInlining (), getM (), getMMax (), getMMax0 (),
355
336
getEfConstruction (), isExtendCandidates (), isKeepPrunedConnections ());
356
337
}
357
338
}
0 commit comments