Click or drag to resize

NumericalAnalysisExtensionsStandardDeviationT(IEnumerableT, FuncT, Single, Boolean) Method

Computes the standard deviation over a sequence of Single values.

Namespace: GSF.NumericalAnalysis
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public static float StandardDeviation<T>(
	this IEnumerable<T> source,
	Func<T, float> selector,
	bool calculateForSample = false
)
View Source

Parameters

source  IEnumerableT
Source data sample.
selector  FuncT, Single
Used to map value from enumerable of T to enumerable of Single.
calculateForSample  Boolean  (Optional)
Set to true to calculate for estimated population size, or false for full population.

Type Parameters

T
Type of source used to extract float.

Return Value

Single
The standard deviation of the sequence.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableT. 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).
Exceptions
ExceptionCondition
ArgumentNullExceptionsource is null.
ArgumentOutOfRangeExceptionsource does not contain enough values to produce a result.
See Also