







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Syntax
C# |
---|
public static class Algorithms |
Visual Basic (Declaration) |
---|
Public NotInheritable Class Algorithms |
Visual C++ |
---|
public ref class Algorithms abstract sealed |
The type exposes the following members.
Public Methods
Name | Description | |
---|---|---|
![]() ![]() | BinarySearch | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | CountWhere<(Of <T>)> |
Counts the number of items in the collection that satisfy the condition
defined by predicate.
|
![]() ![]() | DisjointSets | Overloaded. |
![]() ![]() | EqualCollections | Overloaded. |
![]() ![]() | EqualSets | Overloaded. |
![]() ![]() | Exists<(Of <T>)> |
Determines if a collection contains any item that satisfies the condition
defined by predicate.
|
![]() ![]() | Fill | Overloaded. |
![]() ![]() | FillRange | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | FirstConsecutiveWhere<(Of <T>)> |
Finds the first occurence of count consecutive items in the
list for which a given predicate returns true.
|
![]() ![]() | FirstIndexOf | Overloaded. |
![]() ![]() | FirstIndexOfMany | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | GetCollectionEqualityComparer | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | IndexOfMaximum | Overloaded. |
![]() ![]() | IndexOfMinimum | Overloaded. |
![]() ![]() | IndicesOf | Overloaded. |
![]() ![]() | IndicesOfMany | Overloaded. |
![]() ![]() | IsProperSubsetOf | Overloaded. |
![]() ![]() | IsSubsetOf | Overloaded. |
![]() ![]() | LastIndexOf | Overloaded. |
![]() ![]() | LastIndexOfMany | Overloaded. |
![]() ![]() | LexicographicalCompare | Overloaded. |
![]() ![]() | Maximum | Overloaded. |
![]() ![]() | MergeSorted | Overloaded. |
![]() ![]() | Minimum | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | RandomShuffleInPlace | Overloaded. |
![]() ![]() | RandomSubset | Overloaded. |
![]() ![]() | Range | Overloaded. |
![]() ![]() | ReadOnly | Overloaded. |
![]() ![]() | ReadWriteList<(Of <T>)> | Creates a read-write IList<T> wrapper around an array. When an array is implicitely converted to an IList<T>, changes to the items in the array cannot be made through the interface. This method creates a read-write IList<T> wrapper on an array that can be used to make changes to the array. Use this method when you need to pass an array to an algorithms that takes an IList<T> and that tries to modify items in the list. Algorithms in this class generally do not need this method, since they have been design to operate on arrays even when they are passed as an IList<T>. |
![]() ![]() | RemoveDuplicates | Overloaded. |
![]() ![]() | RemoveDuplicatesInPlace | Overloaded. |
![]() ![]() | RemoveWhere<(Of <T>)> |
Removes all the items in the collection that satisfy the condition
defined by predicate.
|
![]() ![]() | Replace | Overloaded. |
![]() ![]() | ReplaceInPlace | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | SetDifference | Overloaded. |
![]() ![]() | SetIntersection | Overloaded. |
![]() ![]() | SetSymmetricDifference | Overloaded. |
![]() ![]() | SetUnion | Overloaded. |
![]() ![]() | Sort | Overloaded. |
![]() ![]() | SortInPlace | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | StableSortInPlace | Overloaded. |
![]() ![]() | ToArray<(Of <T>)> |
Create an array with the items in a collection.
|
![]() ![]() | ToString | Overloaded. |
![]() ![]() | 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 | Overloaded. |
![]() ![]() | Untyped | Overloaded. |
See Also
Wintellect.PowerCollections Namespace