Algorithms Members

Wintellect PowerCollections

Collapse imageExpand ImageCollapseAll imageExpandAll imageDropDown imageDropDownHover imageCopy imageCopyHover image
[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

  NameDescription
Public methodStatic memberBinarySearchOverloaded.
Public methodStatic memberCartesianProduct<(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 methodStatic memberConcatenate<(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 methodStatic memberConvert<(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 methodStatic memberCopyOverloaded.
Public methodStatic memberCount<(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 methodStatic memberCountEqualOverloaded.
Public methodStatic memberCountWhere<(Of <T>)>
Counts the number of items in the collection that satisfy the condition defined by predicate.
Public methodStatic memberDisjointSetsOverloaded.
Public methodStatic memberEqualCollectionsOverloaded.
Public methodStatic memberEqualSetsOverloaded.
Public methodStatic memberExists<(Of <T>)>
Determines if a collection contains any item that satisfies the condition defined by predicate.
Public methodStatic memberFillOverloaded.
Public methodStatic memberFillRangeOverloaded.
Public methodStatic memberFindFirstIndexWhere<(Of <T>)>
Finds the index of the first item in a list that satisfies the condition defined by predicate.
Public methodStatic memberFindFirstWhere<(Of <T>)>
Finds the first item in a collection that satisfies the condition defined by predicate.
Public methodStatic memberFindIndicesWhere<(Of <T>)>
Enumerates the indices of all the items in list that satisfy the condition defined by predicate.
Public methodStatic memberFindLastIndexWhere<(Of <T>)>
Finds the index of the last item in a list that satisfies the condition defined by predicate.
Public methodStatic memberFindLastWhere<(Of <T>)>
Finds the last item in a collection that satisfies the condition defined by predicate.
Public methodStatic memberFindWhere<(Of <T>)>
Enumerates all the items in collection that satisfy the condition defined by predicate.
Public methodStatic memberFirstConsecutiveEqualOverloaded.
Public methodStatic memberFirstConsecutiveWhere<(Of <T>)>
Finds the first occurence of count consecutive items in the list for which a given predicate returns true.
Public methodStatic memberFirstIndexOfOverloaded.
Public methodStatic memberFirstIndexOfManyOverloaded.
Public methodStatic memberForEach<(Of <T>)>
Performs the specified action on each item in a collection.
Public methodStatic memberGeneratePermutations<(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 methodStatic memberGenerateSortedPermutationsOverloaded.
Public methodStatic memberGetCollectionEqualityComparerOverloaded.
Public methodStatic memberGetComparerFromComparison<(Of <T>)>
Given a comparison delegate that compares two items of type T, gets an IComparer<T> instance that performs the same comparison.
Public methodStatic memberGetComparisonFromComparer<(Of <T>)>
Given in IComparer<T> instenace that comparers two items from type T, gets a Comparison delegate that performs the same comparison.
Public methodStatic memberGetDictionaryConverterOverloaded.
Public methodStatic memberGetIdentityComparer<(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 methodStatic memberGetLexicographicalComparerOverloaded.
Public methodStatic memberGetReverseComparer<(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 methodStatic memberGetReverseComparison<(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 methodStatic memberGetSetEqualityComparerOverloaded.
Public methodStatic memberIndexOfMaximumOverloaded.
Public methodStatic memberIndexOfMinimumOverloaded.
Public methodStatic memberIndicesOfOverloaded.
Public methodStatic memberIndicesOfManyOverloaded.
Public methodStatic memberIsProperSubsetOfOverloaded.
Public methodStatic memberIsSubsetOfOverloaded.
Public methodStatic memberLastIndexOfOverloaded.
Public methodStatic memberLastIndexOfManyOverloaded.
Public methodStatic memberLexicographicalCompareOverloaded.
Public methodStatic memberMaximumOverloaded.
Public methodStatic memberMergeSortedOverloaded.
Public methodStatic memberMinimumOverloaded.
Public methodStatic memberNCopiesOf<(Of <T>)>
Creates an IEnumerator that enumerates a given item n times.
Public methodStatic memberPartition<(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 methodStatic memberRandomShuffleOverloaded.
Public methodStatic memberRandomShuffleInPlaceOverloaded.
Public methodStatic memberRandomSubsetOverloaded.
Public methodStatic memberRangeOverloaded.
Public methodStatic memberReadOnlyOverloaded.
Public methodStatic memberReadWriteList<(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>.

Public methodStatic memberRemoveDuplicatesOverloaded.
Public methodStatic memberRemoveDuplicatesInPlaceOverloaded.
Public methodStatic memberRemoveWhere<(Of <T>)>
Removes all the items in the collection that satisfy the condition defined by predicate.
Public methodStatic memberReplaceOverloaded.
Public methodStatic memberReplaceInPlaceOverloaded.
Public methodStatic memberReverse<(Of <T>)>
Reverses a list and returns the reversed list, without changing the source list.
Public methodStatic memberReverseInPlace<(Of <T>)>
Reverses a list or array in place.
Public methodStatic memberRotate<(Of <T>)>
Rotates a list and returns the rotated list, without changing the source list.
Public methodStatic memberRotateInPlace<(Of <T>)>
Rotates a list or array in place.
Public methodStatic memberSearchForSubsequenceOverloaded.
Public methodStatic memberSetDifferenceOverloaded.
Public methodStatic memberSetIntersectionOverloaded.
Public methodStatic memberSetSymmetricDifferenceOverloaded.
Public methodStatic memberSetUnionOverloaded.
Public methodStatic memberSortOverloaded.
Public methodStatic memberSortInPlaceOverloaded.
Public methodStatic memberStablePartition<(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 methodStatic memberStableSortOverloaded.
Public methodStatic memberStableSortInPlaceOverloaded.
Public methodStatic memberToArray<(Of <T>)>
Create an array with the items in a collection.
Public methodStatic memberToStringOverloaded.
Public methodStatic memberTrueForAll<(Of <T>)>
Determines if all of the items in the collection satisfy the condition defined by predicate.
Public methodStatic memberTryFindFirstWhere<(Of <T>)>
Finds the first item in a collection that satisfies the condition defined by predicate.
Public methodStatic memberTryFindLastWhere<(Of <T>)>
Finds the last item in a collection that satisfies the condition defined by predicate.
Public methodStatic memberTypedAsOverloaded.
Public methodStatic memberUntypedOverloaded.

See Also