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

Algorithms..::..SearchForSubsequence Method

Overload List


  Name Description
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.