Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class TopOrdAndInt32Comparer

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

    NOTE: This is a refactoring of TopOrdAndIntQueue in Lucene
    Inheritance
    object
    PriorityComparer<OrdAndValue<int>>
    TopOrdAndInt32Comparer
    Implements
    IComparer<OrdAndValue<int>>
    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 TopOrdAndInt32Comparer : PriorityComparer<OrdAndValue<int>>, IComparer<OrdAndValue<int>>

    Properties

    Default

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

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

    Methods

    LessThan(OrdAndValue<int>, OrdAndValue<int>)

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

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

    The left value to compare.

    OrdAndValue<int> b

    The right value to compare.

    Returns
    Type Description
    bool

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

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

    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.