Class Lucene91BoundsChecker
- java.lang.Object
-
- org.apache.lucene.backward_codecs.lucene91.Lucene91BoundsChecker
-
- Direct Known Subclasses:
Lucene91BoundsChecker.Max
,Lucene91BoundsChecker.Min
public abstract class Lucene91BoundsChecker extends Object
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 Classes Modifier and Type Class Description static class
Lucene91BoundsChecker.Max
A helper class for an hnsw graph that serves as a comparator of the currently set maximum value with a new value.static class
Lucene91BoundsChecker.Min
A helper class for an hnsw graph that serves as a comparator of the currently set minimum value with a new value.
-
Constructor Summary
Constructors Constructor Description Lucene91BoundsChecker()
Default Constructor
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
check(float sample)
Check the samplestatic Lucene91BoundsChecker
create(boolean reversed)
Create a min or max bound checkervoid
set(float sample)
Update the bound unconditionallyabstract void
update(float sample)
Update the bound if sample is better
-
-
-
Method Detail
-
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)
Check the sample- Parameters:
sample
- a score- Returns:
- whether the sample exceeds (is worse than) the bound
-
create
public static Lucene91BoundsChecker create(boolean reversed)
Create a min or max bound checker- Parameters:
reversed
- true for the min and false for the max- Returns:
- the bound checker
-
-