Пример #1
0
 public static Heap <T> CreateMinHeap <T>(ICollection <T> collection, IComparer <T> comparer)
 => Heap <T> .CreateHeap(collection, comparer.Invert());
Пример #2
0
 public static IComparer <T> ThenByDescending <T>(this IComparer <T> first, IComparer <T> second) =>
 new CompositeComparer <T>(first, second.Invert());
Пример #3
0
 public static TSource Min <TSource>(this IEnumerable <TSource> source, IComparer <TSource> comparer)
 => Max(source, comparer.Invert());