Class ReverseComparer<T>
Reverses the order of the nested comparer.
Inheritance
System.Object
ReverseComparer<T>
Implements
System.Collections.Generic.IComparer<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: Mars.Common.Collections.KNNGraph
Assembly: Mars.Common.dll
Syntax
public class ReverseComparer<T> : IComparer<T>
Type Parameters
Name | Description |
---|---|
T | The types of items to compare with. |
Constructors
| Improve this Doc View SourceReverseComparer(IComparer<T>)
Initializes a new instance of the ReverseComparer<T> class.
Declaration
public ReverseComparer(IComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IComparer<T> | comparer | The comparer to invert. |
Methods
| Improve this Doc View SourceCompare(T, T)
Reverses the order of the nested comparer.
Declaration
public int Compare(T x, T y)
Parameters
Type | Name | Description |
---|---|---|
T | x | |
T | y |
Returns
Type | Description |
---|---|
System.Int32 |
Implements
System.Collections.Generic.IComparer<T>