Class Util.TopNSearcher<T>
Utility class to find top N shortest paths from start point(s).
Inheritance
System.Object
Util.TopNSearcher<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Util.Fst
Assembly: Lucene.Net.dll
Syntax
public class TopNSearcher<T>
Type Parameters
Name | Description |
---|---|
T |
Constructors
| Improve this Doc View SourceTopNSearcher(FST<T>, Int32, Int32, 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 |
System.Int32 | topN | the number of top scoring entries to retrieve |
System.Int32 | maxQueueDepth | the maximum size of the queue of possible top entries |
System.Collections.Generic.IComparer<T> | comparer | the comparer to select the top N |
Methods
| Improve this Doc View SourceAcceptResult(Int32sRef, T)
Declaration
protected virtual bool AcceptResult(Int32sRef input, T output)
Parameters
Type | Name | Description |
---|---|---|
Int32sRef | input | |
T | output |
Returns
Type | Description |
---|---|
System.Boolean |
AddIfCompetitive(Util.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(FST.Arc<T>, T, Boolean, 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 | |
System.Boolean | allowEmptyString | |
Int32sRef | input |
Search()
Declaration
public virtual Util.TopResults<T> Search()
Returns
Type | Description |
---|---|
Util.TopResults<T> |