Table of Contents

Method ExponentialMovingAverage

Namespace
MongoDB.Driver.Linq
Assembly
MongoDB.Driver.dll

ExponentialMovingAverage<TInput>(ISetWindowFieldsPartition<TInput>, 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<TInput>

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

decimal

The exponential moving average of the selected values.

Type Parameters

TInput

The type of the input documents in the partition.

ExponentialMovingAverage<TInput>(ISetWindowFieldsPartition<TInput>, 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<TInput>

The partition.

selector Func<TInput, double>

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

double

The exponential moving average of the selected values.

Type Parameters

TInput

The type of the input documents in the partition.

ExponentialMovingAverage<TInput>(ISetWindowFieldsPartition<TInput>, 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<TInput>

The partition.

selector Func<TInput, int>

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

double

The exponential moving average of the selected values.

Type Parameters

TInput

The type of the input documents in the partition.

ExponentialMovingAverage<TInput>(ISetWindowFieldsPartition<TInput>, 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<TInput>

The partition.

selector Func<TInput, long>

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

double

The exponential moving average of the selected values.

Type Parameters

TInput

The type of the input documents in the partition.

ExponentialMovingAverage<TInput>(ISetWindowFieldsPartition<TInput>, 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<TInput>

The partition.

selector Func<TInput, float>

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

float

The exponential moving average of the selected values.

Type Parameters

TInput

The type of the input documents in the partition.