Class MovingAverage
A moving average.
Inheritance
System.Object
MovingAverage
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class MovingAverage
Constructors
MovingAverage(Int32)
Initializes a new instance of the MovingAverage class.
Declaration
public MovingAverage(int lookback)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | lookback | The number of lookback values. |
Properties
Average
Gets the average.
Declaration
public long Average { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
Methods
Add(Int64)
Adds a sample.
Declaration
public void Add(long value)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | value | The value to add. |