Same as Average<TSource>(IQueryable<TSource>, Expression<Func<TSource, Single>>), but returns an IQueryable<Single>
containing a single element. Computes the average of a set of float values that
is obtained by applying a function to each element of the input dataset.
Namespace: Microsoft.Research.DryadLinq
Assembly: Microsoft.Research.DryadLinq (in Microsoft.Research.DryadLinq.dll) Version: 0.2.1.0 (0.2.1.0)
Syntax
public static IQueryable<float> AverageAsQuery<TSource>( this IQueryable<TSource> source, Expression<Func<TSource, float>> selector )
Parameters
- source
- Type: System.Linq.IQueryable<TSource>
The input dataset - selector
- Type: System.Linq.Expressions.Expression<Func<TSource, Single>>
A transformation function to apply to each element
Type Parameters
- TSource
- The type of the elements of source
Return Value
Type: IQueryable<Single>The average of the values after applying the transformation function
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IQueryable<TSource>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).See Also