Show / Hide Table of Contents

    Class Util.TopNSearcher<T>

    Utility class to find top N shortest paths from start point(s).

    Inheritance
    System.Object
    Util.TopNSearcher<T>
    Namespace: Lucene.Net.Util.Fst
    Assembly: Lucene.Net.dll
    Syntax
    public class TopNSearcher<T> : object
    Type Parameters
    Name Description
    T

    Constructors

    | Improve this Doc View Source

    TopNSearcher(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

    IComparer<T> comparer

    the comparer to select the top N

    Methods

    | Improve this Doc View Source

    AcceptResult(Int32sRef, T)

    Declaration
    protected virtual bool AcceptResult(Int32sRef input, T output)
    Parameters
    Type Name Description
    Int32sRef input
    T output
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    Search()

    Declaration
    public virtual Util.TopResults<T> Search()
    Returns
    Type Description
    Util.TopResults<T>
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)