Algorithms Members
The Algorithms type exposes the following members.
Methods
Name | Description | |
---|---|---|
![]() ![]() |
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>).
|
![]() ![]() |
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>.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
CountEqual<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), T) |
Counts the number of items in the collection that are equal to find.
|
![]() ![]() |
CountEqual<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), T, IEqualityComparer<(Of <<'(T>)>>)) |
Counts the number of items in the collection that are equal to find.
|
![]() ![]() |
CountWhere<(Of <<'(T>)>>) |
Counts the number of items in the collection that satisfy the condition
defined by predicate.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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".
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
Exists<(Of <<'(T>)>>) |
Determines if a collection contains any item that satisfies the condition
defined by predicate.
|
![]() ![]() |
Fill<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T) |
Replaces each item in a list with a given value. The list does not change in size.
|
![]() ![]() |
Fill<(Of <<'(T>)>>)(array<T>[]()[][], T) |
Replaces each item in a array with a given value.
|
![]() ![]() |
FillRange<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32, Int32, T) |
Replaces each item in a part of a list with a given value.
|
![]() ![]() |
FillRange<(Of <<'(T>)>>)(array<T>[]()[][], Int32, Int32, T) |
Replaces each item in a part of a array with a given value.
|
![]() ![]() |
FindFirstIndexWhere<(Of <<'(T>)>>) |
Finds the index of the first item in a list that satisfies the condition
defined by predicate.
|
![]() ![]() |
FindFirstWhere<(Of <<'(T>)>>) |
Finds the first item in a collection that satisfies the condition
defined by predicate.
|
![]() ![]() |
FindIndicesWhere<(Of <<'(T>)>>) |
Enumerates the indices of all the items in list that satisfy the condition defined
by predicate.
|
![]() ![]() |
FindLastIndexWhere<(Of <<'(T>)>>) |
Finds the index of the last item in a list that satisfies the condition
defined by predicate.
|
![]() ![]() |
FindLastWhere<(Of <<'(T>)>>) |
Finds the last item in a collection that satisfies the condition
defined by predicate.
|
![]() ![]() |
FindWhere<(Of <<'(T>)>>) |
Enumerates all the items in collection that satisfy the condition defined
by predicate.
|
![]() ![]() |
FirstConsecutiveEqual<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Int32) |
Finds the first occurence of count consecutive equal items in the
list.
|
![]() ![]() |
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.
|
![]() ![]() |
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".
|
![]() ![]() |
FirstConsecutiveWhere<(Of <<'(T>)>>) |
Finds the first occurence of count consecutive items in the
list for which a given predicate returns true.
|
![]() ![]() |
FirstIndexOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T) |
Finds the index of the first item in a list equal to a given item.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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".
|
![]() ![]() |
ForEach<(Of <<'(T>)>>) |
Performs the specified action on each item in a collection.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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 |
![]() ![]() |
GetComparerFromComparison<(Of <<'(T>)>>) |
Given a comparison delegate that compares two items of type T, gets an
IComparer<T> instance that performs the same comparison.
|
![]() ![]() |
GetComparisonFromComparer<(Of <<'(T>)>>) |
Given in IComparer<T> instenace that comparers two items from type T,
gets a Comparison delegate that performs the same comparison.
|
![]() ![]() |
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).
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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 |
![]() ![]() |
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.
|
![]() ![]() |
IndexOfMaximum<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>)) |
Finds the index of the maximum value in a list.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
IndexOfMinimum<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>)) |
Finds the index of the minimum value in a list.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
IndicesOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T) |
Enumerates the indices of all the items in a list equal to a given item.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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".
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
LastIndexOf<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), T) |
Finds the index of the last item in a list equal to a given item.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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".
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
Maximum<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) |
Finds the maximum value in a collection.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
Minimum<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) |
Finds the minimum value in a collection.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
NCopiesOf<(Of <<'(T>)>>) |
Creates an IEnumerator that enumerates a given item n times.
|
![]() ![]() |
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.
|
![]() ![]() |
RandomShuffle<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) |
Randomly shuffles the items in a collection, yielding a new collection.
|
![]() ![]() |
RandomShuffle<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>), Random) |
Randomly shuffles the items in a collection, yielding a new collection.
|
![]() ![]() |
RandomShuffleInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>)) |
Randomly shuffles the items in a list or array, in place.
|
![]() ![]() |
RandomShuffleInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>), Random) |
Randomly shuffles the items in a list or array, in place.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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).
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
ReadWriteList<(Of <<'(T>)>>) |
Reads the write list.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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".
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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".
|
![]() ![]() |
RemoveWhere<(Of <<'(T>)>>) |
Removes all the items in the collection that satisfy the condition
defined by predicate.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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. .
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
Reverse<(Of <<'(T>)>>) |
Reverses a list and returns the reversed list, without changing the source list.
|
![]() ![]() |
ReverseInPlace<(Of <<'(T>)>>) |
Reverses a list or array in place.
|
![]() ![]() |
Rotate<(Of <<'(T>)>>) |
Rotates a list and returns the rotated list, without changing the source list.
|
![]() ![]() |
RotateInPlace<(Of <<'(T>)>>) |
Rotates a list or array in place.
|
![]() ![]() |
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.
|
![]() ![]() |
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".
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
Sort<(Of <<'(T>)>>)(IEnumerable<(Of <<'(T>)>>)) |
Creates a sorted version of a collection.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
SortInPlace<(Of <<'(T>)>>)(IList<(Of <<'(T>)>>)) |
Sorts a list or array in place.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
ToArray<(Of <<'(T>)>>) |
Create an array with the items in a collection.
|
![]() ![]() |
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.
|
![]() ![]() |
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").
|
![]() ![]() |
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.
|
![]() ![]() |
TrueForAll<(Of <<'(T>)>>) |
Determines if all of the items in the collection satisfy the condition
defined by predicate.
|
![]() ![]() |
TryFindFirstWhere<(Of <<'(T>)>>) |
Finds the first item in a collection that satisfies the condition
defined by predicate.
|
![]() ![]() |
TryFindLastWhere<(Of <<'(T>)>>) |
Finds the last item in a collection that satisfies the condition
defined by predicate.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|
![]() ![]() |
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.
|