Class Util.TopNSearcher<T>
Utility class to find top N shortest paths from start point(s).
Inherited Members
Namespace: Lucene.Net.Util.Fst
Assembly: Lucene.Net.dll
Syntax
public class Util.TopNSearcher<T> where T : class
Type Parameters
Name | Description |
---|---|
T |
Constructors
TopNSearcher(FST<T>, int, int, IComparer<T>)
Creates an unbounded TopNSearcher
Declaration
public TopNSearcher(FST<T> fst, int topN, int maxQueueDepth, IComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
FST<T> | fst | the FST<T> to search on |
int | topN | the number of top scoring entries to retrieve |
int | maxQueueDepth | the maximum size of the queue of possible top entries |
IComparer<T> | comparer | the comparer to select the top N |
Methods
AcceptResult(Int32sRef, T)
Utility class to find top N shortest paths from start point(s).
Declaration
protected virtual bool AcceptResult(Int32sRef input, T output)
Parameters
Type | Name | Description |
---|---|---|
Int32sRef | input | |
T | output |
Returns
Type | Description |
---|---|
bool |
AddIfCompetitive(FSTPath<T>)
If back plus this arc is competitive then add to queue:
Declaration
protected virtual void AddIfCompetitive(Util.FSTPath<T> path)
Parameters
Type | Name | Description |
---|---|---|
Util.FSTPath<T> | path |
AddStartPaths(Arc<T>, T, bool, Int32sRef)
Adds all leaving arcs, including 'finished' arc, if the node is final, from this node into the queue.
Declaration
public virtual void AddStartPaths(FST.Arc<T> node, T startOutput, bool allowEmptyString, Int32sRef input)
Parameters
Type | Name | Description |
---|---|---|
FST.Arc<T> | node | |
T | startOutput | |
bool | allowEmptyString | |
Int32sRef | input |
Search()
Utility class to find top N shortest paths from start point(s).
Declaration
public virtual Util.TopResults<T> Search()
Returns
Type | Description |
---|---|
Util.TopResults<T> |