Class EnumerableExtensions
Extension methods for IEnumerable
Inheritance
EnumerableExtensions
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public static class EnumerableExtensions
Methods
AreEqual(IEnumerable, IEnumerable)
Declaration
public static bool AreEqual(IEnumerable a, IEnumerable b)
Parameters
Returns
AreEqual<T>(IEnumerable<T>, IEnumerable<T>)
Declaration
public static bool AreEqual<T>(IEnumerable<T> a, IEnumerable<T> b)
Parameters
Returns
Type Parameters
CopyTo<T>(IEnumerable<T>, T[], Int32)
Declaration
public static void CopyTo<T>(this IEnumerable<T> list, T[] array, int index)
Parameters
Type Parameters
FindAllIndex<T>(IEnumerable<T>, Predicate<T>)
Declaration
public static IEnumerable<int> FindAllIndex<T>(this IEnumerable<T> list, Predicate<T> predicate)
Parameters
Returns
Type Parameters
FindIndex<T>(IEnumerable<T>, Predicate<T>)
Get the index of the first item where predicate returns true, or -1 if none
Declaration
public static int FindIndex<T>(this IEnumerable<T> list, Predicate<T> predicate)
Parameters
Returns
Type Parameters
FindIndex<T>(IEnumerable, Predicate<T>)
Declaration
public static int FindIndex<T>(this IEnumerable list, Predicate<T> predicate)
Parameters
Returns
Type Parameters
ForEach<T>(IEnumerable<T>, Action<T>)
Declaration
public static void ForEach<T>(this IEnumerable<T> list, Action<T> action)
Parameters
Type Parameters
ForEach<T>(IEnumerable<T>, Action<Int32, T>)
Declaration
public static void ForEach<T>(this IEnumerable<T> list, Action<int, T> action)
Parameters
Type Parameters
ForEach<T>(IEnumerable, Action<T>)
Declaration
public static void ForEach<T>(this IEnumerable list, Action<T> action)
Parameters
Type Parameters
ForEach<T>(IEnumerable, Action<Int32, T>)
Declaration
public static void ForEach<T>(this IEnumerable list, Action<int, T> action)
Parameters
Type Parameters
ForEach<T, U>(IEnumerable<T>, IEnumerable<U>, Action<T, U>)
Declaration
public static void ForEach<T, U>(IEnumerable<T> list, IEnumerable<U> list2, Action<T, U> action)
Parameters
Type Parameters
Declaration
public static IEnumerable<T> FromEnumerator<T>(IEnumerator<T> iter)
Parameters
Returns
Type Parameters
IndexOf<T>(IEnumerable<T>, T)
Declaration
public static int IndexOf<T>(this IEnumerable<T> list, T value)
Parameters
Returns
Type Parameters
IndexOf<T>(IEnumerable, T)
Declaration
public static int IndexOf<T>(this IEnumerable list, T value)
Parameters
Returns
Type Parameters
IndexOfAll<T>(IEnumerable<T>, T)
Declaration
public static IEnumerable<int> IndexOfAll<T>(this IEnumerable<T> list, T value)
Parameters
Returns
Type Parameters
IntersectMany<T>(IEnumerable<HashSet<T>>)
Declaration
public static HashSet<T> IntersectMany<T>(this IEnumerable<HashSet<T>> sets)
Parameters
Returns
Type Parameters
JaggedValueEquals<T>(IEnumerable<IEnumerable<T>>, IEnumerable<IEnumerable<T>>)
Declaration
public static bool JaggedValueEquals<T>(this IEnumerable<IEnumerable<T>> a, IEnumerable<IEnumerable<T>> b)
Parameters
Returns
Type Parameters
Merge<T>(IEnumerable<T>, IEnumerable<T>, Comparison<T>)
Merges two sorted lists into one list in ascending order.
Declaration
public static IEnumerable<T> Merge<T>(IEnumerable<T> list1, IEnumerable<T> list2, Comparison<T> comparer)
Parameters
Returns
Type Parameters
Skip<T>(IEnumerable<T>, Int32, out List<T>)
Skip n items from a stream, saving the skipped items to a list
Declaration
public static IEnumerable<T> Skip<T>(this IEnumerable<T> stream, int count, out List<T> head)
Parameters
Type |
Name |
Description |
IEnumerable<T> |
stream |
A stream
|
Int32 |
count |
The number of items to skip from the front of the stream.
|
List<T> |
head |
On return, the skipped items.
|
Returns
Type |
Description |
IEnumerable<T> |
The rest of the stream.
|
Type Parameters
Name |
Description |
T |
The item type.
|
Sum(IEnumerable<UInt32>)
Declaration
public static uint Sum(this IEnumerable<uint> source)
Parameters
Returns
Sum(IEnumerable<UInt64>)
Declaration
public static ulong Sum(this IEnumerable<ulong> source)
Parameters
Returns
Sum<TSource>(IEnumerable<TSource>, Func<TSource, UInt32>)
Declaration
public static uint Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, uint> selector)
Parameters
Returns
Type Parameters
Sum<TSource>(IEnumerable<TSource>, Func<TSource, UInt64>)
Declaration
public static ulong Sum<TSource>(this IEnumerable<TSource> source, Func<TSource, ulong> selector)
Parameters
Returns
Type Parameters
ToReadOnlyList<T>(IEnumerable<T>)
Declaration
public static IReadOnlyList<T> ToReadOnlyList<T>(this IEnumerable<T> list)
Parameters
Returns
Type Parameters
TrueForAll<T>(IEnumerable<T>, IEnumerable<T>, Predicate<T, T>)
Declaration
public static bool TrueForAll<T>(IEnumerable<T> a, IEnumerable<T> b, Predicate<T, T> predicate)
Parameters
Returns
Type Parameters
ValueEquals<T>(IEnumerable<T>, IEnumerable<T>)
Declaration
public static bool ValueEquals<T>(this IEnumerable<T> a, IEnumerable<T> b)
Parameters
Returns
Type Parameters