Search Results for

    Show / Hide Table of Contents

    Class IEnumerableExensions

    Provides extension methods for IEnumerable that support sparse collections.

    Inheritance
    Object
    IEnumerableExensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Collections
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    public static class IEnumerableExensions

    Methods

    EnumerableReduce<T, TRes>(IEnumerable<T>, TRes, Func<TRes, T, TRes>, Func<TRes, T, Int32, TRes>)

    Reduces across an enumerable, supporting sparse enumerables

    Declaration
    public static TRes EnumerableReduce<T, TRes>(this IEnumerable<T> source, TRes initial, Func<TRes, T, TRes> fun, Func<TRes, T, int, TRes> repeatedFun)
    Parameters
    Type Name Description
    IEnumerable<T> source

    This collection

    TRes initial

    Initial value for reduction

    Func<TRes, T, TRes> fun

    The function

    Func<TRes, T, Int32, TRes> repeatedFun

    The function when the same value enters the reduction several times.

    Returns
    Type Description
    TRes
    Type Parameters
    Name Description
    T

    Type of this collection

    TRes

    Type of result

    EnumerableSum<T>(IEnumerable<T>, Func<T, Double>)

    Declaration
    public static double EnumerableSum<T>(this IEnumerable<T> source, Func<T, double> fun)
    Parameters
    Type Name Description
    IEnumerable<T> source
    Func<T, Double> fun
    Returns
    Type Description
    Double
    Type Parameters
    Name Description
    T

    ListZip<TFirst, TSecond, TResult>(IList<TFirst>, IEnumerable<TSecond>, Func<TFirst, TSecond, TResult>)

    Declaration
    public static IList<TResult> ListZip<TFirst, TSecond, TResult>(this IList<TFirst> first, IEnumerable<TSecond> second, Func<TFirst, TSecond, TResult> fun)
    Parameters
    Type Name Description
    IList<TFirst> first
    IEnumerable<TSecond> second
    Func<TFirst, TSecond, TResult> fun
    Returns
    Type Description
    IList<TResult>
    Type Parameters
    Name Description
    TFirst
    TSecond
    TResult

    ListZip<TFirst, TSecond, TThird, TResult>(IList<TFirst>, IEnumerable<TSecond>, IEnumerable<TThird>, Func<TFirst, TSecond, TThird, TResult>)

    Declaration
    public static IList<TResult> ListZip<TFirst, TSecond, TThird, TResult>(this IList<TFirst> first, IEnumerable<TSecond> second, IEnumerable<TThird> third, Func<TFirst, TSecond, TThird, TResult> fun)
    Parameters
    Type Name Description
    IList<TFirst> first
    IEnumerable<TSecond> second
    IEnumerable<TThird> third
    Func<TFirst, TSecond, TThird, TResult> fun
    Returns
    Type Description
    IList<TResult>
    Type Parameters
    Name Description
    TFirst
    TSecond
    TThird
    TResult

    ListZip<TFirst, TSecond, TThird, TFourth, TResult>(IList<TFirst>, IList<TSecond>, IList<TThird>, IList<TFourth>, Func<TFirst, TSecond, TThird, TFourth, TResult>)

    Declaration
    public static IList<TResult> ListZip<TFirst, TSecond, TThird, TFourth, TResult>(this IList<TFirst> first, IList<TSecond> second, IList<TThird> third, IList<TFourth> fourth, Func<TFirst, TSecond, TThird, TFourth, TResult> fun)
    Parameters
    Type Name Description
    IList<TFirst> first
    IList<TSecond> second
    IList<TThird> third
    IList<TFourth> fourth
    Func<TFirst, TSecond, TThird, TFourth, TResult> fun
    Returns
    Type Description
    IList<TResult>
    Type Parameters
    Name Description
    TFirst
    TSecond
    TThird
    TFourth
    TResult
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.