/// <summary> /// Takes values from the sequence to fill the provided collection. /// </summary> public static void CopyInto <TV, TK, TC, TE>( this OrderingPlan <TV, TK, TC, TE> plan, ICollection <TV> output) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => plan.ToEnumerable().CopyInto(output);
public static TSource Aggregate <TSource, TK, TC, TE>( this OrderingPlan <TSource, TK, TC, TE> plan, Func <TSource, TSource, TSource> func) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TSource, TK> => plan.ToEnumerable().Aggregate(func);
/// <summary> /// Takes enough values from the sequence to fill the provided span. /// </summary> /// <remarks> /// A copy of the enumerable is taken, which means that (beyond any /// side-effects of consuming values from it) the original /// enumerable is unchanged. /// </remarks> /// <returns> /// Returns the span, maybe resized if there were not enough values /// in the enumerable. /// </returns> public static Span <TV> TakeInto <TV, TK, TC, TE>( this OrderingPlan <TV, TK, TC, TE> plan, Span <TV> output) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => plan.ToEnumerable().TakeInto(output);
/// <summary> /// The sum of a sequence, with a delegate returning a double /// for each element of the sequence. /// </summary> public static double Sum <TV, TK, TC, TE>( this OrderingPlan <TV, TK, TC, TE> plan, Func <TV, double> getValue) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => plan.ToEnumerable().Sum(getValue);
/// <summary> /// The single element of a sequence that satisfies a predicate. /// </summary> public static TV Single <TV, TK, TC, TE>( this OrderingPlan <TV, TK, TC, TE> ordering, Predicate <TV> predicate) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => ordering.ToEnumerable().Single(predicate);
Slice <TV, TK, TC, TE>( this OrderingPlan <TV, TK, TC, TE> plan, int offset) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => plan.ToEnumerable().Slice(offset);
/// <summary> /// Create a dictionary containing all elements from the input /// sequence. /// </summary> public static Dictionary <TDK, TDV> ToDictionary <TV, TK, TC, TE, TDK, TDV>( this OrderingPlan <TV, TK, TC, TE> plan, Func <TV, TDK> keySelector, Func <TV, TDV> valueSelector) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => plan.ToEnumerable().ToDictionary(keySelector, valueSelector);
public static TAccum Aggregate <TSource, TK, TC, TE, TAccum>( this OrderingPlan <TSource, TK, TC, TE> plan, TAccum seed, Func <TAccum, TSource, TAccum> func) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TSource, TK> => plan.ToEnumerable().Aggregate(seed, func);
/// <summary> /// Takes values from the sequence to fill the provided dictionary. /// </summary> public static void CopyInto <TV, TK, TC, TE, TDV, TDK>( this OrderingPlan <TV, TK, TC, TE> plan, IDictionary <TDK, TDV> output, Func <TV, TDK> keySelector, Func <TV, TDV> valueSelector) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => plan.ToEnumerable().CopyInto(output, keySelector, valueSelector);
/// <summary> /// Create a hash set containing all elements from the input /// sequence. /// </summary> public static HashSet <TV> ToHashSet <TV, TK, TC, TE>( this OrderingPlan <TV, TK, TC, TE> plan) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => plan.ToEnumerable().ToHashSet();
/// <summary> /// Create an array containing all elements from the input /// sequence. /// </summary> public static TV[] ToArray <TV, TK, TC, TE>( this OrderingPlan <TV, TK, TC, TE> plan) where TC : IComparer <TK> where TE : struct, IKeyExtractor <TV, TK> => plan.ToEnumerable().ToArray();
/// <summary> The sum of a sequence of double. </summary> public static double Sum <TK, TC, TE>( this OrderingPlan <double, TK, TC, TE> plan) where TC : IComparer <TK> where TE : struct, IKeyExtractor <double, TK> => plan.ToEnumerable().Sum();