Package org.apache.lucene.util.hnsw
Class BoundsChecker
java.lang.Object
org.apache.lucene.util.hnsw.BoundsChecker
- Direct Known Subclasses:
BoundsChecker.Max,BoundsChecker.Min
A helper class for an hnsw graph that serves as a comparator of the currently set bound value
with a new value.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA helper class for an hnsw graph that serves as a comparator of the currently set maximum value with a new value.static classA helper class for an hnsw graph that serves as a comparator of the currently set minimum value with a new value. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleancheck(float sample) static BoundsCheckercreate(boolean reversed) voidset(float sample) Update the bound unconditionallyabstract voidupdate(float sample) Update the bound if sample is better
-
Field Details
-
bound
float bound
-
-
Constructor Details
-
BoundsChecker
public BoundsChecker()
-
-
Method Details
-
update
public abstract void update(float sample) Update the bound if sample is better -
set
public void set(float sample) Update the bound unconditionally -
check
public abstract boolean check(float sample) - Returns:
- whether the sample exceeds (is worse than) the bound
-
create
-