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
+5 -2
View File
@@ -52,7 +52,10 @@ public sealed class Mape : BiInputIndicatorBase
ValidateBatchInputs(actual, predicted, output, period);
int len = actual.Length;
if (len == 0) return;
if (len == 0)
{
return;
}
const int StackAllocThreshold = 256;
Span<double> percentErrors = len <= StackAllocThreshold
@@ -62,4 +65,4 @@ public sealed class Mape : BiInputIndicatorBase
ErrorHelpers.ComputePercentageErrors(actual, predicted, percentErrors, Epsilon);
ErrorHelpers.ApplyRollingMean(percentErrors, output, period);
}
}
}