Method ExponentialMovingAverage
| MongoDB CSharp Driver API Reference (original) (raw)
Namespace
Assembly
MongoDB.Driver.dll
ExponentialMovingAverage(ISetWindowFieldsPartition, Func<TInput, decimal>, ExponentialMovingAverageWeighting, SetWindowFieldsWindow)
Returns the exponential moving average value of the numeric values. Ignores non-numeric values.
public static decimal ExponentialMovingAverage<TInput>(this ISetWindowFieldsPartition<TInput> partition, Func<TInput, decimal> selector, ExponentialMovingAverageWeighting weighting, SetWindowFieldsWindow window = null)
Parameters
partition
ISetWindowFieldsPartition
The partition.
selector
Func<TInput, decimal>
The selector that selects a value from the input document.
weighting
ExponentialMovingAverageWeighting
How to weigh the values when computing the exponential moving average.
window
SetWindowFieldsWindow
The window boundaries.
Returns
The exponential moving average of the selected values.
Type Parameters
TInput
The type of the input documents in the partition.
ExponentialMovingAverage(ISetWindowFieldsPartition, Func<TInput, double>, ExponentialMovingAverageWeighting, SetWindowFieldsWindow)
Returns the exponential moving average value of the numeric values. Ignores non-numeric values.
public static double ExponentialMovingAverage<TInput>(this ISetWindowFieldsPartition<TInput> partition, Func<TInput, double> selector, ExponentialMovingAverageWeighting weighting, SetWindowFieldsWindow window = null)
Parameters
partition
ISetWindowFieldsPartition
The partition.
The selector that selects a value from the input document.
weighting
ExponentialMovingAverageWeighting
How to weigh the values when computing the exponential moving average.
window
SetWindowFieldsWindow
The window boundaries.
Returns
The exponential moving average of the selected values.
Type Parameters
TInput
The type of the input documents in the partition.
ExponentialMovingAverage(ISetWindowFieldsPartition, Func<TInput, int>, ExponentialMovingAverageWeighting, SetWindowFieldsWindow)
Returns the exponential moving average value of the numeric values. Ignores non-numeric values.
public static double ExponentialMovingAverage<TInput>(this ISetWindowFieldsPartition<TInput> partition, Func<TInput, int> selector, ExponentialMovingAverageWeighting weighting, SetWindowFieldsWindow window = null)
Parameters
partition
ISetWindowFieldsPartition
The partition.
The selector that selects a value from the input document.
weighting
ExponentialMovingAverageWeighting
How to weigh the values when computing the exponential moving average.
window
SetWindowFieldsWindow
The window boundaries.
Returns
The exponential moving average of the selected values.
Type Parameters
TInput
The type of the input documents in the partition.
ExponentialMovingAverage(ISetWindowFieldsPartition, Func<TInput, long>, ExponentialMovingAverageWeighting, SetWindowFieldsWindow)
Returns the exponential moving average value of the numeric values. Ignores non-numeric values.
public static double ExponentialMovingAverage<TInput>(this ISetWindowFieldsPartition<TInput> partition, Func<TInput, long> selector, ExponentialMovingAverageWeighting weighting, SetWindowFieldsWindow window = null)
Parameters
partition
ISetWindowFieldsPartition
The partition.
The selector that selects a value from the input document.
weighting
ExponentialMovingAverageWeighting
How to weigh the values when computing the exponential moving average.
window
SetWindowFieldsWindow
The window boundaries.
Returns
The exponential moving average of the selected values.
Type Parameters
TInput
The type of the input documents in the partition.
ExponentialMovingAverage(ISetWindowFieldsPartition, Func<TInput, float>, ExponentialMovingAverageWeighting, SetWindowFieldsWindow)
Returns the exponential moving average value of the numeric values. Ignores non-numeric values.
public static float ExponentialMovingAverage<TInput>(this ISetWindowFieldsPartition<TInput> partition, Func<TInput, float> selector, ExponentialMovingAverageWeighting weighting, SetWindowFieldsWindow window = null)
Parameters
partition
ISetWindowFieldsPartition
The partition.
The selector that selects a value from the input document.
weighting
ExponentialMovingAverageWeighting
How to weigh the values when computing the exponential moving average.
window
SetWindowFieldsWindow
The window boundaries.
Returns
The exponential moving average of the selected values.
Type Parameters
TInput
The type of the input documents in the partition.