Class FuncExtensions
Provides extension methods for Func that support collection and sparse collections
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Collections
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public static class FuncExtensions
Methods
Map<T, TRes>(Func<T, TRes>, IEnumerable<T>)
Maps one enumerable sequence to another. Supports sparse representations.
Declaration
public static IEnumerable<TRes> Map<T, TRes>(this Func<T, TRes> fun, IEnumerable<T> a)
Parameters
Type | Name | Description |
---|---|---|
Func<T, TRes> | fun | The function |
IEnumerable<T> | a | The source sequence |
Returns
Type | Description |
---|---|
IEnumerable<TRes> |
Type Parameters
Name | Description |
---|---|
T | Source sequence element type |
TRes | Result sequence element type |
Map<T1, T2, TRes>(Func<T1, T2, TRes>, IEnumerable<T1>, IEnumerable<T2>)
Maps two enumerable sequences to another. Supports sparse representations.
Declaration
public static IEnumerable<TRes> Map<T1, T2, TRes>(this Func<T1, T2, TRes> fun, IEnumerable<T1> a, IEnumerable<T2> b)
Parameters
Type | Name | Description |
---|---|---|
Func<T1, T2, TRes> | fun | The function |
IEnumerable<T1> | a | First source sequence |
IEnumerable<T2> | b | Second source sequence |
Returns
Type | Description |
---|---|
IEnumerable<TRes> |
Type Parameters
Name | Description |
---|---|
T1 | First source sequence element type |
T2 | Second source sequence element type |
TRes | Result sequence element type |
Map<T1, T2, T3, TRes>(Func<T1, T2, T3, TRes>, IEnumerable<T1>, IEnumerable<T2>, IEnumerable<T3>)
Maps three enumerable sequences to another. Supports sparse representations.
Declaration
public static IEnumerable<TRes> Map<T1, T2, T3, TRes>(this Func<T1, T2, T3, TRes> fun, IEnumerable<T1> a, IEnumerable<T2> b, IEnumerable<T3> c)
Parameters
Type | Name | Description |
---|---|---|
Func<T1, T2, T3, TRes> | fun | The function |
IEnumerable<T1> | a | First source sequence |
IEnumerable<T2> | b | Second source sequence |
IEnumerable<T3> | c | Second source sequence |
Returns
Type | Description |
---|---|
IEnumerable<TRes> |
Type Parameters
Name | Description |
---|---|
T1 | First source sequence element type |
T2 | Second source sequence element type |
T3 | Third source sequence element type |
TRes | Result sequence element type |
Map<T1, T2, T3, T4, TRes>(Func<T1, T2, T3, T4, TRes>, IEnumerable<T1>, IEnumerable<T2>, IEnumerable<T3>, IEnumerable<T4>)
Maps four enumerable sequences to another. Supports sparse representations.
Declaration
public static IEnumerable<TRes> Map<T1, T2, T3, T4, TRes>(this Func<T1, T2, T3, T4, TRes> fun, IEnumerable<T1> a, IEnumerable<T2> b, IEnumerable<T3> c, IEnumerable<T4> d)
Parameters
Type | Name | Description |
---|---|---|
Func<T1, T2, T3, T4, TRes> | fun | The function |
IEnumerable<T1> | a | First source sequence |
IEnumerable<T2> | b | Third source sequence |
IEnumerable<T3> | c | Fourth source sequence |
IEnumerable<T4> | d | Fifth source sequence |
Returns
Type | Description |
---|---|
IEnumerable<TRes> |
Type Parameters
Name | Description |
---|---|
T1 | First source sequence element type |
T2 | Second source sequence element type |
T3 | Third source sequence element type |
T4 | Fourth source sequence element type |
TRes | Result sequence element type |
Map<T1, T2, T3, T4, T5, TRes>(Func<T1, T2, T3, T4, T5, TRes>, IEnumerable<T1>, IEnumerable<T2>, IEnumerable<T3>, IEnumerable<T4>, IEnumerable<T5>)
Maps four enumerable sequences to another. Supports sparse representations.
Declaration
public static IEnumerable<TRes> Map<T1, T2, T3, T4, T5, TRes>(this Func<T1, T2, T3, T4, T5, TRes> fun, IEnumerable<T1> a, IEnumerable<T2> b, IEnumerable<T3> c, IEnumerable<T4> d, IEnumerable<T5> e)
Parameters
Type | Name | Description |
---|---|---|
Func<T1, T2, T3, T4, T5, TRes> | fun | The function |
IEnumerable<T1> | a | First source sequence |
IEnumerable<T2> | b | Second source sequence |
IEnumerable<T3> | c | Third source sequence |
IEnumerable<T4> | d | Fourth source sequence |
IEnumerable<T5> | e | Fifth source sequence |
Returns
Type | Description |
---|---|
IEnumerable<TRes> |
Type Parameters
Name | Description |
---|---|
T1 | First source sequence element type |
T2 | Second source sequence element type |
T3 | Third source sequence element type |
T4 | Fourth source sequence element type |
T5 | Fifth source sequence element type |
TRes | Result sequence element type |