Algorithms..::..MergeSorted<(Of <(<'T>)>)> Method (IComparer<(Of <(<'T>)>)>, array<IEnumerable<(Of <(<'T>)>)>>[]()[][])
Merge several sorted collections into a single sorted collection. Each input collection must be sorted
by the ordering in the passed instance of IComparer<T>. The merging
is stable; equal items maintain their ordering, and equal items in different collections are placed
in the order of the collections.
Namespace:
Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
public static IEnumerable<T> MergeSorted<T>( IComparer<T> comparer, params IEnumerable<T>[] collections ) where T : IComparable<T>
Public Shared Function MergeSorted(Of T As IComparable(Of T)) ( _ comparer As IComparer(Of T), _ ParamArray collections As IEnumerable(Of T)() _ ) As IEnumerable(Of T)
public: generic<typename T> where T : IComparable<T> static IEnumerable<T>^ MergeSorted( IComparer<T>^ comparer, ... array<IEnumerable<T>^>^ collections )
Type Parameters
- T
Parameters
- comparer
- Type: IComparer<(Of <(<'T>)>)>
The comparer instance used to sort the list. Only the Compare method is used.
- collections
- Type: array<IEnumerable<(Of <(<'T>)>)>>[]()[][]
The set of collections to merge. In many languages, this parameter can be specified as several individual parameters.