Class ReverseComparer<T>
Reverses the order of the nested comparer.
Inheritance
IComparer<T>
ReverseComparer<T>
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
ReverseComparer(IComparer<T>)
Initializes a new instance of the ReverseComparer<T> class.
Declaration
public ReverseComparer(IComparer<T> comparer)
Parameters
Type | Name | Description |
---|---|---|
IComparer<T> | comparer | The comparer to invert. |
Methods
Compare(T, T)
Declaration
public int Compare(T x, T y)
Parameters
Type | Name | Description |
---|---|---|
T | x | |
T | y |
Returns
Type | Description |
---|---|
System.Int32 |