This commit is contained in:
Miha Kralj
2024-10-08 13:59:33 -07:00
parent 46f5ffe9e9
commit 0bc41854aa
19 changed files with 48 additions and 218 deletions
-6
View File
@@ -11,7 +11,6 @@ namespace QuanTAlib;
/// </remarks>
public class Variance : AbstractBase
{
private readonly int Period;
private readonly bool IsPopulation;
private readonly CircularBuffer _buffer;
@@ -26,17 +25,12 @@ public class Variance : AbstractBase
/// <exception cref="ArgumentOutOfRangeException">
/// Thrown when period is less than 2.
/// </exception>
<<<<<<< HEAD
public Variance(int period, bool isPopulation = false) : base()
=======
public Variance(int period, bool isPopulation = false)
>>>>>>> dev
{
if (period < 2)
{
throw new ArgumentOutOfRangeException(nameof(period), "Period must be greater than or equal to 2.");
}
Period = period;
IsPopulation = isPopulation;
WarmupPeriod = 0;
_buffer = new CircularBuffer(period);