Method CompareBottom
CompareBottom(Int32)
Compare the bottom of the queue with doc. This will only invoked after setBottom has been called. This should return the same result as Compare(Int32, Int32) } as if bottom were slot1 and the new document were slot 2.
For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).
Declaration
public abstract int CompareBottom(int doc)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | doc | that was hit |
Returns
Type | Description |
---|---|
System.Int32 | any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal. |