Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class TopOrdAndSingleComparer

    Keeps highest results, first by largest float value, then tie break by smallest ord.

    NOTE: This is a refactoring of TopOrdAndFloatQueue in Lucene
    Inheritance
    object
    PriorityComparer<OrdAndValue<float>>
    TopOrdAndSingleComparer
    Implements
    IComparer<OrdAndValue<float>>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Facet
    Assembly: Lucene.Net.Facet.dll
    Syntax
    public sealed class TopOrdAndSingleComparer : PriorityComparer<OrdAndValue<float>>, IComparer<OrdAndValue<float>>

    Properties

    Default

    Returns a default sort order comparer for OrdAndValue<T>. Keeps highest results, first by largest float value, then tie break by smallest ord.

    Declaration
    public static TopOrdAndSingleComparer Default { get; }
    Property Value
    Type Description
    TopOrdAndSingleComparer

    Methods

    LessThan(OrdAndValue<float>, OrdAndValue<float>)

    Determines the ordering of objects in this priority queue. Subclasses must define this one method.

    Declaration
    protected override bool LessThan(OrdAndValue<float> a, OrdAndValue<float> b)
    Parameters
    Type Name Description
    OrdAndValue<float> a

    The left value to compare.

    OrdAndValue<float> b

    The right value to compare.

    Returns
    Type Description
    bool

    true if parameter a is less than parameter b; otherwise false.

    Overrides
    PriorityComparer<OrdAndValue<float>>.LessThan(OrdAndValue<float>, OrdAndValue<float>)

    Implements

    IComparer<T>
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.