Wintellect.PowerCollections Namespace
Algorithms Class
Algorithms Methods
GhostDoc Pro Sample Help File

Algorithms Members

The Algorithms type exposes the following members.

Methods


  Name Description
Public method Static member BinarySearch<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T, Int32%)
Searches a sorted list for an item via binary search. The list must be sorted by the natural ordering of the type (it's implementation of IComparable<T>).
Public method Static member BinarySearch<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T, IComparer<(Of <<'(T>)>>), Int32%)
Searches a sorted list for an item via binary search. The list must be sorted by the ordering in the passed instance of IComparer<T>.
Public method Static member BinarySearch<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T, Comparison<(Of <<'(T>)>>), Int32%)
Searches a sorted list for an item via binary search. The list must be sorted by the ordering in the passed Comparison<T> delegate.
Public method Static member CartesianProduct<(Of <<'(TFirst, TSecond>)>>)
Computes the cartestian product of two collections: all possible pairs of items, with the first item taken from the first collection and the second item taken from the second collection. If the first collection has N items, and the second collection has M items, the cartesian product will have N * M pairs.
Public method Static member Concatenate<(Of <<'(T>)>>)
Concatenates all the items from several collections. The collections need not be of the same type, but must have the same item type.
Public method Static member Convert<(Of <<'(TSource, TDest>)>>)
Convert a collection of items by applying a delegate to each item in the collection. The resulting collection contains the result of applying converter to each item in sourceCollection, in order.
Public method Static member Copy<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IList<(Of <<'(T>)>>), Int32)
Copies all of the items from the collection source to the list dest, starting at the index destIndex. If necessary, the size of the destination list is expanded.
Public method Static member Copy<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), array<T>[]()[][], Int32)
Copies all of the items from the collection source to the array dest, starting at the index destIndex.
Public method Static member Copy<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IList<(Of <<'(T>)>>), Int32, Int32)
Copies at most count items from the collection source to the list dest, starting at the index destIndex. If necessary, the size of the destination list is expanded. The source collection must not be the destination list or part thereof.
Public method Static member Copy<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), array<T>[]()[][], Int32, Int32)
Copies at most count items from the collection source to the array dest, starting at the index destIndex. The source collection must not be the destination array or part thereof.
Public method Static member Copy<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32, IList<(Of <<'(T>)>>), Int32, Int32)
Copies count items from the list source, starting at the index sourceIndex, to the list dest, starting at the index destIndex. If necessary, the size of the destination list is expanded. The source and destination lists may be the same.
Public method Static member Copy<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32, array<T>[]()[][], Int32, Int32)
Copies count items from the list or array source, starting at the index sourceIndex, to the array dest, starting at the index destIndex. The source may be the same as the destination array.
Public method Static member Count<(Of <<'(T>)>>)
Count the number of items in an IEnumerable<T> collection. If a more specific collection type is being used, it is more efficient to use the Count property, if one is provided.
Public method Static member CountEqual<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), T)
Counts the number of items in the collection that are equal to find.
Public method Static member CountEqual<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), T, IEqualityComparer<(Of <<'(T>)>>))
Counts the number of items in the collection that are equal to find.
Public method Static member CountWhere<(Of <<'(T>)>>)
Counts the number of items in the collection that satisfy the condition defined by predicate.
Public method Static member DisjointSets<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Determines if two collections are disjoint, considered as sets. Two sets are disjoint if they have no common items.
Public method Static member DisjointSets<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Determines if two collections are disjoint, considered as sets. Two sets are disjoint if they have no common items.
Public method Static member EqualCollections<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Determines if the two collections contain equal items in the same order. The two collections do not need to be of the same type; it is permissible to compare an array and an OrderedBag, for instance.
Public method Static member EqualCollections<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Determines if the two collections contain equal items in the same order. The passed instance of IEqualityComparer<T> is used for determining if two items are equal.
Public method Static member EqualCollections<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), BinaryPredicate<(Of <<'(T>)>>))
Determines if the two collections contain "equal" items in the same order. The passed BinaryPredicate is used to determine if two items are "equal".
Public method Static member EqualSets<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Determines if two collections are equal, considered as sets. Two sets are equal if they have have the same items, with order not being significant.
Public method Static member EqualSets<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Determines if two collections are equal, considered as sets. Two sets are equal if they have have the same items, with order not being significant.
Public method Static member Exists<(Of <<'(T>)>>)
Determines if a collection contains any item that satisfies the condition defined by predicate.
Public method Static member Fill<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T)
Replaces each item in a list with a given value. The list does not change in size.
Public method Static member Fill<(Of <<'(T>)>>)(array<T>[]()[][], T)
Replaces each item in a array with a given value.
Public method Static member FillRange<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32, Int32, T)
Replaces each item in a part of a list with a given value.
Public method Static member FillRange<(Of <<'(T>)>>)(array<T>[]()[][], Int32, Int32, T)
Replaces each item in a part of a array with a given value.
Public method Static member FindFirstIndexWhere<(Of <<'(T>)>>)
Finds the index of the first item in a list that satisfies the condition defined by predicate.
Public method Static member FindFirstWhere<(Of <<'(T>)>>)
Finds the first item in a collection that satisfies the condition defined by predicate.
Public method Static member FindIndicesWhere<(Of <<'(T>)>>)
Enumerates the indices of all the items in list that satisfy the condition defined by predicate.
Public method Static member FindLastIndexWhere<(Of <<'(T>)>>)
Finds the index of the last item in a list that satisfies the condition defined by predicate.
Public method Static member FindLastWhere<(Of <<'(T>)>>)
Finds the last item in a collection that satisfies the condition defined by predicate.
Public method Static member FindWhere<(Of <<'(T>)>>)
Enumerates all the items in collection that satisfy the condition defined by predicate.
Public method Static member FirstConsecutiveEqual<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32)
Finds the first occurence of count consecutive equal items in the list.
Public method Static member FirstConsecutiveEqual<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32, IEqualityComparer<(Of <<'(T>)>>))
Finds the first occurence of count consecutive equal items in the list. A passed IEqualityComprer is used to determine equality.
Public method Static member FirstConsecutiveEqual<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32, BinaryPredicate<(Of <<'(T>)>>))
Finds the first occurence of count consecutive "equal" items in the list. The passed BinaryPredicate is used to determine if two items are "equal".
Public method Static member FirstConsecutiveWhere<(Of <<'(T>)>>)
Finds the first occurence of count consecutive items in the list for which a given predicate returns true.
Public method Static member FirstIndexOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T)
Finds the index of the first item in a list equal to a given item.
Public method Static member FirstIndexOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T, IEqualityComparer<(Of <<'(T>)>>))
Finds the index of the first item in a list equal to a given item. A passed IEqualityComparer is used to determine equality.
Public method Static member FirstIndexOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Finds the index of the first item in a list equal to one of several given items.
Public method Static member FirstIndexOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Finds the index of the first item in a list equal to one of several given items. A passed IEqualityComparer is used to determine equality.
Public method Static member FirstIndexOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), BinaryPredicate<(Of <<'(T>)>>))
Finds the index of the first item in a list "equal" to one of several given items. The passed BinaryPredicate is used to determine if two items are "equal".
Public method Static member ForEach<(Of <<'(T>)>>)
Performs the specified action on each item in a collection.
Public method Static member GeneratePermutations<(Of <<'(T>)>>)
Generates all the possible permutations of the items in collection. If collection has N items, then N factorial permutations will be generated. This method does not compare the items to determine if any of them are equal. If some items are equal, the same permutation may be generated more than once. For example, if the collections contains the three items A, A, and B, then this method will generate the six permutations, AAB, AAB, ABA, ABA, BAA, BAA (not necessarily in that order). To take equal items into account, use the GenerateSortedPermutations method.
Public method Static member GenerateSortedPermutations<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Generates all the possible permutations of the items in collection, in lexicographical order. Even if some items are equal, the same permutation will not be generated more than once. For example, if the collections contains the three items A, A, and B, then this method will generate only the three permutations, AAB, ABA, BAA.
Public method Static member GenerateSortedPermutations<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Generates all the possible permutations of the items in collection, in lexicographical order. A supplied IComparer<T> instance is used to compare the items. Even if some items are equal, the same permutation will not be generated more than once. For example, if the collections contains the three items A, A, and B, then this method will generate only the three permutations, AAB, ABA, BAA.
Public method Static member GenerateSortedPermutations<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Generates all the possible permutations of the items in collection, in lexicographical order. A supplied Comparison<T> delegate is used to compare the items. Even if some items are equal, the same permutation will not be generated more than once. For example, if the collections contains the three items A, A, and B, then this method will generate only the three permutations, AAB, ABA, BAA.
Public method Static member GetCollectionEqualityComparer<(Of <<'(T>)>>)()()()()
Gets an IEqualityComparer<IEnumerable<T>> implementation that can be used to compare collections of elements (of type T). Two collections of T's are equal if they have the same number of items, and corresponding items are equal, considered in order. This is the same notion of equality as in Algorithms.EqualCollections, but encapsulated in an IEqualityComparer<IEnumerable<T>> implementation.
Public method Static member GetCollectionEqualityComparer<(Of <<'(T>)>>)(IEqualityComparer<(Of <<'(T>)>>))

Gets an IEqualityComparer<IEnumerable<T>> implementation that can be used to compare collections of elements (of type T). Two collections of T's are equal if they have the same number of items, and corresponding items are equal, considered in order. This is the same notion of equality as in Algorithms.EqualCollections, but encapsulated in an IEqualityComparer<IEnumerable<T>> implementation.

An IEqualityComparer<T> is used to determine if individual T's are equal

Public method Static member GetComparerFromComparison<(Of <<'(T>)>>)
Given a comparison delegate that compares two items of type T, gets an IComparer<T> instance that performs the same comparison.
Public method Static member GetComparisonFromComparer<(Of <<'(T>)>>)
Given in IComparer<T> instenace that comparers two items from type T, gets a Comparison delegate that performs the same comparison.
Public method Static member GetDictionaryConverter<(Of <<'(TKey, TValue>)>>)(IDictionary<(Of <<'(TKey, TValue>)>>))
Creates a delegate that converts keys to values by used a dictionary to map values. Keys that a not present in the dictionary are converted to the default value (zero or null).
Public method Static member GetDictionaryConverter<(Of <<'(TKey, TValue>)>>)(IDictionary<(Of <<'(TKey, TValue>)>>), TValue)
Creates a delegate that converts keys to values by used a dictionary to map values. Keys that a not present in the dictionary are converted to a supplied default value.
Public method Static member GetIdentityComparer<(Of <<'(T>)>>)
Gets an IEqualityComparer<T> instance that can be used to compare objects of type T for object identity only. Two objects compare equal only if they are references to the same object.
Public method Static member GetLexicographicalComparer<(Of <<'(T>)>>)()()()()
Creates an IComparer instance that can be used for comparing ordered sequences of type T; that is IEnumerable<Tgt;. This comparer can be used for collections or algorithms that use sequences of T as an item type. The Lexicographical ordered of sequences is for comparison.
Public method Static member GetLexicographicalComparer<(Of <<'(T>)>>)(IComparer<(Of <<'(T>)>>))
Creates an IComparer instance that can be used for comparing ordered sequences of type T; that is IEnumerable<Tgt;. This comparer can be uses for collections or algorithms that use sequences of T as an item type. The Lexicographics ordered of sequences is for comparison.
Public method Static member GetLexicographicalComparer<(Of <<'(T>)>>)(Comparison<(Of <<'(T>)>>))
Creates an IComparer instance that can be used for comparing ordered sequences of type T; that is IEnumerable<Tgt;. This comparer can be uses for collections or algorithms that use sequences of T as an item type. The Lexicographics ordered of sequences is for comparison.
Public method Static member GetReverseComparer<(Of <<'(T>)>>)
Reverses the order of comparison of an IComparer<T>. The resulting comparer can be used, for example, to sort a collection in descending order. Equality and hash codes are unchanged.
Public method Static member GetReverseComparison<(Of <<'(T>)>>)
Reverses the order of comparison of an Comparison<T>. The resulting comparison can be used, for example, to sort a collection in descending order.
Public method Static member GetSetEqualityComparer<(Of <<'(T>)>>)()()()()

Gets an IEqualityComparer<IEnumerable<T>> implementation that can be used to compare collections of elements (of type T). Two collections of T's are equal if they have the same number of items, and corresponding items are equal, without regard to order. This is the same notion of equality as in Algorithms.EqualSets, but encapsulated in an IEqualityComparer<IEnumerable<T>> implementation.

An IEqualityComparer<T> is used to determine if individual T's are equal

Public method Static member GetSetEqualityComparer<(Of <<'(T>)>>)(IEqualityComparer<(Of <<'(T>)>>))
Gets an IEqualityComparer<IEnumerable<T>> implementation that can be used to compare collections of elements (of type T). Two collections of T's are equal if they have the same number of items, and corresponding items are equal, without regard to order. This is the same notion of equality as in Algorithms.EqualSets, but encapsulated in an IEqualityComparer<IEnumerable<T>> implementation.
Public method Static member IndexOfMaximum<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Finds the index of the maximum value in a list.
Public method Static member IndexOfMaximum<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Finds the index of the maximum value in a list. A supplied IComparer<T> is used to compare the items in the collection.
Public method Static member IndexOfMaximum<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Finds the index of the maximum value in a list. A supplied Comparison<T> delegate is used to compare the items in the collection.
Public method Static member IndexOfMinimum<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Finds the index of the minimum value in a list.
Public method Static member IndexOfMinimum<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Finds the index of the minimum value in a list. A supplied IComparer<T> is used to compare the items in the collection.
Public method Static member IndexOfMinimum<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Finds the index of the minimum value in a list. A supplied Comparison<T> delegate is used to compare the items in the collection.
Public method Static member IndicesOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T)
Enumerates the indices of all the items in a list equal to a given item.
Public method Static member IndicesOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T, IEqualityComparer<(Of <<'(T>)>>))
Enumerates the indices of all the items in a list equal to a given item. A passed IEqualityComparer is used to determine equality.
Public method Static member IndicesOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Enumerates the indices of all the items in a list equal to one of several given items.
Public method Static member IndicesOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Enumerates the indices of all the items in a list equal to one of several given items. A passed IEqualityComparer is used to determine equality.
Public method Static member IndicesOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), BinaryPredicate<(Of <<'(T>)>>))
Enumerates the indices of all the items in a list equal to one of several given items. The passed BinaryPredicate is used to determine if two items are "equal".
Public method Static member IsProperSubsetOf<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Determines if one collection is a proper subset of another, considered as sets. The first set is a proper subset of the second set if every item in the first set also occurs in the second set, and the first set is strictly smaller than the second set. If an item appears X times in the first set, it must appear at least X times in the second set.
Public method Static member IsProperSubsetOf<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Determines if one collection is a proper subset of another, considered as sets. The first set is a proper subset of the second set if every item in the first set also occurs in the second set, and the first set is strictly smaller than the second set. If an item appears X times in the first set, it must appear at least X times in the second set.
Public method Static member IsSubsetOf<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Determines if one collection is a subset of another, considered as sets. The first set is a subset of the second set if every item in the first set also occurs in the second set. If an item appears X times in the first set, it must appear at least X times in the second set.
Public method Static member IsSubsetOf<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Determines if one collection is a subset of another, considered as sets. The first set is a subset of the second set if every item in the first set also occurs in the second set. If an item appears X times in the first set, it must appear at least X times in the second set.
Public method Static member LastIndexOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T)
Finds the index of the last item in a list equal to a given item.
Public method Static member LastIndexOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T, IEqualityComparer<(Of <<'(T>)>>))
Finds the index of the last item in a list equal to a given item. A passed IEqualityComparer is used to determine equality.
Public method Static member LastIndexOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Finds the index of the last item in a list equal to one of several given items.
Public method Static member LastIndexOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Finds the index of the last item in a list equal to one of several given items. A passed IEqualityComparer is used to determine equality.
Public method Static member LastIndexOfMany<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), BinaryPredicate<(Of <<'(T>)>>))
Finds the index of the last item in a list "equal" to one of several given items. The passed BinaryPredicate is used to determine if two items are "equal".
Public method Static member LexicographicalCompare<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Performs a lexicographical comparison of two sequences of values. A lexicographical comparison compares corresponding pairs of elements from two sequences in order. If the first element of sequence1 is less than the first element of sequence2, then the comparison ends and the first sequence is lexicographically less than the second. If the first elements of each sequence are equal, then the comparison proceeds to the second element of each sequence. If one sequence is shorter than the other, but corresponding elements are all equal, then the shorter sequence is considered less than the longer one.
Public method Static member LexicographicalCompare<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Performs a lexicographical comparison of two sequences of values, using a supplied comparison delegate. A lexicographical comparison compares corresponding pairs of elements from two sequences in order. If the first element of sequence1 is less than the first element of sequence2, then the comparison ends and the first sequence is lexicographically less than the second. If the first elements of each sequence are equal, then the comparison proceeds to the second element of each sequence. If one sequence is shorter than the other, but corresponding elements are all equal, then the shorter sequence is considered less than the longer one.
Public method Static member LexicographicalCompare<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Performs a lexicographical comparison of two sequences of values, using a supplied comparer interface. A lexicographical comparison compares corresponding pairs of elements from two sequences in order. If the first element of sequence1 is less than the first element of sequence2, then the comparison ends and the first sequence is lexicographically less than the second. If the first elements of each sequence are equal, then the comparison proceeds to the second element of each sequence. If one sequence is shorter than the other, but corresponding elements are all equal, then the shorter sequence is considered less than the longer one.
Public method Static member Maximum<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Finds the maximum value in a collection.
Public method Static member Maximum<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Finds the maximum value in a collection. A supplied IComparer<T> is used to compare the items in the collection.
Public method Static member Maximum<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Finds the maximum value in a collection. A supplied Comparison<T> delegate is used to compare the items in the collection.
Public method Static member MergeSorted<(Of <<'(T>)>>)(array<IEnumerable<(Of <<'(T>)>>)>[]()[][])
Merge several sorted collections into a single sorted collection. Each input collection must be sorted by the natural ordering of the type (it's implementation of IComparable<T>). The merging is stable; equal items maintain their ordering, and equal items in different collections are placed in the order of the collections.
Public method Static member MergeSorted<(Of <<'(T>)>>)(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.
Public method Static member MergeSorted<(Of <<'(T>)>>)(Comparison<(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 Comparison<T> delegate. The merging is stable; equal items maintain their ordering, and equal items in different collections are placed in the order of the collections.
Public method Static member Minimum<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Finds the minimum value in a collection.
Public method Static member Minimum<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Finds the minimum value in a collection. A supplied IComparer<T> is used to compare the items in the collection.
Public method Static member Minimum<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Finds the minimum value in a collection. A supplied Comparison<T> delegate is used to compare the items in the collection.
Public method Static member NCopiesOf<(Of <<'(T>)>>)
Creates an IEnumerator that enumerates a given item n times.
Public method Static member Partition<(Of <<'(T>)>>)
Partition a list or array based on a predicate. After partitioning, all items for which the predicate returned true precede all items for which the predicate returned false.
Public method Static member RandomShuffle<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Randomly shuffles the items in a collection, yielding a new collection.
Public method Static member RandomShuffle<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Random)
Randomly shuffles the items in a collection, yielding a new collection.
Public method Static member RandomShuffleInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Randomly shuffles the items in a list or array, in place.
Public method Static member RandomShuffleInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Random)
Randomly shuffles the items in a list or array, in place.
Public method Static member RandomSubset<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Int32)
Picks a random subset of count items from collection, and places those items into a random order. No item is selected more than once.
Public method Static member RandomSubset<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Int32, Random)
Picks a random subset of count items from collection, and places those items into a random order. No item is selected more than once.
Public method Static member Range<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32, Int32)
Returns a view onto a sub-range of a list. Items from list are not copied; the returned IList<T> is simply a different view onto the same underlying items. Changes to list are reflected in the view, and vice versa. Insertions and deletions in the view change the size of the view, but insertions and deletions in the underlying list do not.
Public method Static member Range<(Of <<'(T>)>>)(array<T>[]()[][], Int32, Int32)
Returns a view onto a sub-range of an array. Items from array are not copied; the returned IList<T> is simply a different view onto the same underlying items. Changes to array are reflected in the view, and vice versa. Insertions and deletions in the view change the size of the view. After an insertion, the last item in array "falls off the end". After a deletion, the last item in array becomes the default value (0 or null).
Public method Static member ReadOnly<(Of <<'(T>)>>)(ICollection<(Of <<'(T>)>>))
Returns a read-only view onto a collection. The returned ICollection<T> interface only allows operations that do not change the collection: GetEnumerator, Contains, CopyTo, Count. The ReadOnly property returns false, indicating that the collection is read-only. All other methods on the interface throw a NotSupportedException.
Public method Static member ReadOnly<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Returns a read-only view onto a list. The returned IList<T> interface only allows operations that do not change the list: GetEnumerator, Contains, CopyTo, Count, IndexOf, and the get accessor of the indexer. The IsReadOnly property returns true, indicating that the list is read-only. All other methods on the interface throw a NotSupportedException.
Public method Static member ReadOnly<(Of <<'(TKey, TValue>)>>)(IDictionary<(Of <<'(TKey, TValue>)>>))
Returns a read-only view onto a dictionary. The returned IDictionary<TKey,TValue> interface only allows operations that do not change the dictionary. The IsReadOnly property returns true, indicating that the dictionary is read-only. All other methods on the interface throw a NotSupportedException.
Public method Static member ReadWriteList<(Of <<'(T>)>>)
Reads the write list.
Public method Static member RemoveDuplicates<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Remove consecutive equal items from a collection, yielding another collection. In each run of consecutive equal items in the collection, all items after the first item in the run are removed.
Public method Static member RemoveDuplicates<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Remove consecutive equal items from a collection, yielding another collection. In each run of consecutive equal items in the collection, all items after the first item in the run are removed. A passed IEqualityComparer is used to determine equality.
Public method Static member RemoveDuplicates<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), BinaryPredicate<(Of <<'(T>)>>))
Remove consecutive "equal" items from a collection, yielding another collection. In each run of consecutive equal items in the collection, all items after the first item in the run are removed. The passed BinaryPredicate is used to determine if two items are "equal".
Public method Static member RemoveDuplicatesInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Remove consecutive equal items from a list or array. In each run of consecutive equal items in the list, all items after the first item in the run are removed. The removal is done in-place, changing the list.
Public method Static member RemoveDuplicatesInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Remove subsequent consecutive equal items from a list or array. In each run of consecutive equal items in the list, all items after the first item in the run are removed. The replacement is done in-place, changing the list. A passed IEqualityComparer is used to determine equality.
Public method Static member RemoveDuplicatesInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), BinaryPredicate<(Of <<'(T>)>>))
Remove consecutive "equal" items from a list or array. In each run of consecutive equal items in the list, all items after the first item in the run are removed. The replacement is done in-place, changing the list. The passed BinaryPredicate is used to determine if two items are "equal".
Public method Static member RemoveWhere<(Of <<'(T>)>>)
Removes all the items in the collection that satisfy the condition defined by predicate.
Public method Static member Replace<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), T, T)
Replace all items in a collection equal to a particular value with another values, yielding another collection.
Public method Static member Replace<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), T, T, IEqualityComparer<(Of <<'(T>)>>))
Replace all items in a collection equal to a particular value with another values, yielding another collection. A passed IEqualityComparer is used to determine equality.
Public method Static member Replace<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Predicate<(Of <<'(T>)>>), T)
Replace all items in a collection that a predicate evalues at true with a value, yielding another collection. .
Public method Static member ReplaceInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T, T)
Replace all items in a list or array equal to a particular value with another value. The replacement is done in-place, changing the list.
Public method Static member ReplaceInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T, T, IEqualityComparer<(Of <<'(T>)>>))
Replace all items in a list or array equal to a particular value with another values. The replacement is done in-place, changing the list. A passed IEqualityComparer is used to determine equality.
Public method Static member ReplaceInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Predicate<(Of <<'(T>)>>), T)
Replace all items in a list or array that a predicate evaluates at true with a value. The replacement is done in-place, changing the list.
Public method Static member Reverse<(Of <<'(T>)>>)
Reverses a list and returns the reversed list, without changing the source list.
Public method Static member ReverseInPlace<(Of <<'(T>)>>)
Reverses a list or array in place.
Public method Static member Rotate<(Of <<'(T>)>>)
Rotates a list and returns the rotated list, without changing the source list.
Public method Static member RotateInPlace<(Of <<'(T>)>>)
Rotates a list or array in place.
Public method Static member SearchForSubsequence<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Searchs a list for a sub-sequence of items that match a particular pattern. A subsequence of list matches pattern at index i if list[i] is equal to the first item in pattern, list[i+1] is equal to the second item in pattern, and so forth for all the items in pattern.
Public method Static member SearchForSubsequence<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), BinaryPredicate<(Of <<'(T>)>>))
Searchs a list for a sub-sequence of items that match a particular pattern. A subsequence of list matches pattern at index i if list[i] is "equal" to the first item in pattern, list[i+1] is "equal" to the second item in pattern, and so forth for all the items in pattern. The passed BinaryPredicate is used to determine if two items are "equal".
Public method Static member SearchForSubsequence<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Searchs a list for a sub-sequence of items that match a particular pattern. A subsequence of list matches pattern at index i if list[i] is equal to the first item in pattern, list[i+1] is equal to the second item in pattern, and so forth for all the items in pattern. The passed instance of IEqualityComparer<T> is used for determining if two items are equal.
Public method Static member SetDifference<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Computes the set-theoretic difference of two collections. The difference of two sets is all items that appear in the first set, but not in the second. If an item appears X times in the first set, and Y times in the second set, the difference contains the item X - Y times (0 times if X < Y). The source collections are not changed. A new collection is created with the difference of the collections; the order of the items in this collection is undefined.
Public method Static member SetDifference<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Computes the set-theoretic difference of two collections. The difference of two sets is all items that appear in the first set, but not in the second. If an item appears X times in the first set, and Y times in the second set, the difference contains the item X - Y times (0 times if X < Y). The source collections are not changed. A new collection is created with the difference of the collections; the order of the items in this collection is undefined.
Public method Static member SetIntersection<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Computes the set-theoretic intersection of two collections. The intersection of two sets is all items that appear in both of the sets. If an item appears X times in one set, and Y times in the other set, the intersection contains the item Minimum(X,Y) times. The source collections are not changed. A new collection is created with the intersection of the collections; the order of the items in this collection is undefined.
Public method Static member SetIntersection<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Computes the set-theoretic intersection of two collections. The intersection of two sets is all items that appear in both of the sets. If an item appears X times in one set, and Y times in the other set, the intersection contains the item Minimum(X,Y) times. The source collections are not changed. A new collection is created with the intersection of the collections; the order of the items in this collection is undefined.
Public method Static member SetSymmetricDifference<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Computes the set-theoretic symmetric difference of two collections. The symmetric difference of two sets is all items that appear in the one of the sets, but not in the other. If an item appears X times in the one set, and Y times in the other set, the symmetric difference contains the item AbsoluteValue(X - Y) times. The source collections are not changed. A new collection is created with the symmetric difference of the collections; the order of the items in this collection is undefined.
Public method Static member SetSymmetricDifference<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Computes the set-theoretic symmetric difference of two collections. The symmetric difference of two sets is all items that appear in the one of the sets, but not in the other. If an item appears X times in the one set, and Y times in the other set, the symmetric difference contains the item AbsoluteValue(X - Y) times. The source collections are not changed. A new collection is created with the symmetric difference of the collections; the order of the items in this collection is undefined.
Public method Static member SetUnion<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>))
Computes the set-theoretic union of two collections. The union of two sets is all items that appear in either of the sets. If an item appears X times in one set, and Y times in the other set, the union contains the item Maximum(X,Y) times. The source collections are not changed. A new collection is created with the union of the collections; the order of the items in this collection is undefined.
Public method Static member SetUnion<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IEnumerable<(Of <<'(T>)>>), IEqualityComparer<(Of <<'(T>)>>))
Computes the set-theoretic union of two collections. The union of two sets is all items that appear in either of the sets. If an item appears X times in one set, and Y times in the other set, the union contains the item Maximum(X,Y) times. The source collections are not changed. A new collection is created with the union of the collections; the order of the items in this collection is undefined.
Public method Static member Sort<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Creates a sorted version of a collection.
Public method Static member Sort<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Creates a sorted version of a collection. A supplied IComparer<T> is used to compare the items in the collection.
Public method Static member Sort<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Creates a sorted version of a collection. A supplied Comparison<T> delegate is used to compare the items in the collection.
Public method Static member SortInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Sorts a list or array in place.
Public method Static member SortInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Sorts a list or array in place. A supplied IComparer<T> is used to compare the items in the list.
Public method Static member SortInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Sorts a list or array in place. A supplied Comparison<T> delegate is used to compare the items in the list.
Public method Static member StablePartition<(Of <<'(T>)>>)
Partition a list or array based on a predicate. After partitioning, all items for which the predicate returned true precede all items for which the predicate returned false. The partition is stable, which means that if items X and Y have the same result from the predicate, and X precedes Y in the original list, X will precede Y in the partitioned list.
Public method Static member StableSort<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Creates a sorted version of a collection. The sort is stable, which means that if items X and Y are equal, and X precedes Y in the unsorted collection, X will precede Y is the sorted collection.
Public method Static member StableSort<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Creates a sorted version of a collection. The sort is stable, which means that if items X and Y are equal, and X precedes Y in the unsorted collection, X will precede Y is the sorted collection. A supplied IComparer<T> is used to compare the items in the collection.
Public method Static member StableSort<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Creates a sorted version of a collection. The sort is stable, which means that if items X and Y are equal, and X precedes Y in the unsorted collection, X will precede Y is the sorted collection. A supplied Comparison<T> delegate is used to compare the items in the collection.
Public method Static member StableSortInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Sorts a list or array in place. The sort is stable, which means that if items X and Y are equal, and X precedes Y in the unsorted collection, X will precede Y is the sorted collection.
Public method Static member StableSortInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), IComparer<(Of <<'(T>)>>))
Sorts a list or array in place. The sort is stable, which means that if items X and Y are equal, and X precedes Y in the unsorted collection, X will precede Y is the sorted collection. A supplied IComparer<T> is used to compare the items in the list.
Public method Static member StableSortInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Comparison<(Of <<'(T>)>>))
Sorts a list or array in place. The sort is stable, which means that if items X and Y are equal, and X precedes Y in the unsorted collection, X will precede Y is the sorted collection. A supplied Comparison<T> delegate is used to compare the items in the list.
Public method Static member ToArray<(Of <<'(T>)>>)
Create an array with the items in a collection.
Public method Static member ToString<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>))
Gets a string representation of the elements in the collection. The string representation starts with "{", has a list of items separated by commas (","), and ends with "}". Each item in the collection is converted to a string by calling its ToString method (null is represented by "null"). Contained collections (except strings) are recursively converted to strings by this method.
Public method Static member ToString<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Boolean, String, String, String)
Gets a string representation of the elements in the collection. The string to used at the beginning and end, and to separate items, and supplied by parameters. Each item in the collection is converted to a string by calling its ToString method (null is represented by "null").
Public method Static member ToString<(Of <<'(TKey, TValue>)>>)(IDictionary<(Of <<'(TKey, TValue>)>>))
Gets a string representation of the mappings in a dictionary. The string representation starts with "{", has a list of mappings separated by commas (", "), and ends with "}". Each mapping is represented by "key->value". Each key and value in the dictionary is converted to a string by calling its ToString method (null is represented by "null"). Contained collections (except strings) are recursively converted to strings by this method.
Public method Static member TrueForAll<(Of <<'(T>)>>)
Determines if all of the items in the collection satisfy the condition defined by predicate.
Public method Static member TryFindFirstWhere<(Of <<'(T>)>>)
Finds the first item in a collection that satisfies the condition defined by predicate.
Public method Static member TryFindLastWhere<(Of <<'(T>)>>)
Finds the last item in a collection that satisfies the condition defined by predicate.
Public method Static member TypedAs<(Of <<'(T>)>>)(IEnumerable)
Given a non-generic IEnumerable interface, wrap a generic IEnumerable<T> interface around it. The generic interface will enumerate the same objects as the underlying non-generic collection, but can be used in places that require a generic interface. The underlying non-generic collection must contain only items that are of type T or a type derived from it. This method is useful when interfacing older, non-generic collections to newer code that uses generic interfaces.
Public method Static member TypedAs<(Of <<'(T>)>>)(ICollection)
Given a non-generic ICollection interface, wrap a generic ICollection<T> interface around it. The generic interface will enumerate the same objects as the underlying non-generic collection, but can be used in places that require a generic interface. The underlying non-generic collection must contain only items that are of type T or a type derived from it. This method is useful when interfacing older, non-generic collections to newer code that uses generic interfaces.
Public method Static member TypedAs<(Of <<'(T>)>>)(IList)
Given a non-generic IList interface, wrap a generic IList<T> interface around it. The generic interface will enumerate the same objects as the underlying non-generic list, but can be used in places that require a generic interface. The underlying non-generic list must contain only items that are of type T or a type derived from it. This method is useful when interfacing older, non-generic lists to newer code that uses generic interfaces.
Public method Static member Untyped<(Of <<'(T>)>>)(ICollection<(Of <<'(T>)>>))
Given a generic ICollection<T> interface, wrap a non-generic (untyped) ICollection interface around it. The non-generic interface will contain the same objects as the underlying generic collection, but can be used in places that require a non-generic interface. This method is useful when interfacing generic interfaces with older code that uses non-generic interfaces.
Public method Static member Untyped<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>))
Given a generic IList<T> interface, wrap a non-generic (untyped) IList interface around it. The non-generic interface will contain the same objects as the underlying generic list, but can be used in places that require a non-generic interface. This method is useful when interfacing generic interfaces with older code that uses non-generic interfaces.