style patterns

This commit is contained in:
Miha Kralj
2026-01-25 16:01:45 -08:00
parent 2836f253c4
commit e59665c8f0
399 changed files with 6892 additions and 1323 deletions
+1 -1
View File
@@ -156,4 +156,4 @@ public class HannIndicatorTests
indicator.Length = 10;
Assert.Equal(10, indicator.Length);
}
}
}
+6 -2
View File
@@ -141,11 +141,15 @@ public class HannTests
Assert.False(hann.IsHot);
// Fill it
for(int i=0; i<5; i++) hann.Update(new TValue(DateTime.UtcNow, 100));
for (int i = 0; i < 5; i++)
{
hann.Update(new TValue(DateTime.UtcNow, 100));
}
Assert.True(hann.IsHot);
hann.Reset();
Assert.False(hann.IsHot);
Assert.Equal(0, hann.Last.Value);
}
}
}
+9 -1
View File
@@ -23,7 +23,11 @@ public class HannValidationTests : IDisposable
protected virtual void Dispose(bool disposing)
{
if (_disposed) return;
if (_disposed)
{
return;
}
if (disposing)
{
_testData?.Dispose();
@@ -71,9 +75,13 @@ public class HannValidationTests : IDisposable
}
if (wSum > double.Epsilon)
{
result[i] = acc / wSum;
}
else
{
result[i] = source[i];
}
}
return result;
+4 -1
View File
@@ -150,7 +150,10 @@ public sealed class Hann : AbstractBase
public override TSeries Update(TSeries source)
{
if (source.Count == 0) return [];
if (source.Count == 0)
{
return [];
}
var resultValues = new double[source.Count];
Calculate(source.Values, resultValues, Length);