Class ComparerExtensions
- Namespace
- AlgorithmsSW
- Assembly
- AlgorithmsSW.dll
Provides extension methods related to IComparer<T>.
public static class ComparerExtensions
- Inheritance
-
ComparerExtensions
- Inherited Members
Methods
ApproximatelyEqualAt<T>(IComparer<T>, IReadonlyRandomAccessList<T>, int, int, T)
public static bool ApproximatelyEqualAt<T>(this IComparer<T> comparer, IReadonlyRandomAccessList<T> list, int leftIndex, int rightIndex, T tolerance) where T : INumber<T>
Parameters
comparer
IComparer<T>list
IReadonlyRandomAccessList<T>leftIndex
intrightIndex
inttolerance
T
Returns
Type Parameters
T
ApproximatelyEqual<T>(IComparer<T>, T, T, T)
public static bool ApproximatelyEqual<T>(this IComparer<T> comparer, T left, T right, T tolerance) where T : INumber<T>
Parameters
comparer
IComparer<T>left
Tright
Ttolerance
T
Returns
Type Parameters
T
EqualAt<T>(IComparer<T>, IReadonlyRandomAccessList<T>, int, int)
public static bool EqualAt<T>(this IComparer<T> comparer, IReadonlyRandomAccessList<T> list, int leftIndex, int rightIndex)
Parameters
comparer
IComparer<T>list
IReadonlyRandomAccessList<T>leftIndex
intrightIndex
int
Returns
Type Parameters
T
Equal<T>(IComparer<T>, T, T)
public static bool Equal<T>(this IComparer<T> comparer, T left, T right)
Parameters
comparer
IComparer<T>left
Tright
T
Returns
Type Parameters
T
Invert<T>(IComparer<T>)
public static IComparer<T> Invert<T>(this IComparer<T> comparer)
Parameters
comparer
IComparer<T>
Returns
- IComparer<T>
Type Parameters
T
LessAt<T>(IComparer<T>, IReadonlyRandomAccessList<T>, int, int)
public static bool LessAt<T>(this IComparer<T> comparer, IReadonlyRandomAccessList<T> list, int leftIndex, int rightIndex)
Parameters
comparer
IComparer<T>list
IReadonlyRandomAccessList<T>leftIndex
intrightIndex
int
Returns
Type Parameters
T
LessOrEqualAt<T>(IComparer<T>, IReadonlyRandomAccessList<T>, int, int)
public static bool LessOrEqualAt<T>(this IComparer<T> comparer, IReadonlyRandomAccessList<T> list, int leftIndex, int rightIndex)
Parameters
comparer
IComparer<T>list
IReadonlyRandomAccessList<T>leftIndex
intrightIndex
int
Returns
Type Parameters
T
LessOrEqual<T>(IComparer<T>, T, T)
public static bool LessOrEqual<T>(this IComparer<T> comparer, T left, T right)
Parameters
comparer
IComparer<T>left
Tright
T
Returns
Type Parameters
T
Less<T>(IComparer<T>, T, T)
public static bool Less<T>(this IComparer<T> comparer, T left, T right)
Parameters
comparer
IComparer<T>left
Tright
T
Returns
Type Parameters
T
ToEqualityComparer<T>(IComparer<T>, Func<T, int>?)
public static IEqualityComparer<T> ToEqualityComparer<T>(this IComparer<T> comparer, Func<T, int>? getHashCode = null)
Parameters
Returns
Type Parameters
T