Class BoundsChecker

  • Direct Known Subclasses:
    BoundsChecker.Max, BoundsChecker.Min

    public abstract class BoundsChecker
    extends Object
    A helper class for an hnsw graph that serves as a comparator of the currently set bound value with a new value.
    • Constructor Detail

      • BoundsChecker

        public BoundsChecker()
    • 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)
        Returns:
        whether the sample exceeds (is worse than) the bound
      • create

        public static BoundsChecker create​(boolean reversed)