mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-22 04:28:04 +00:00
normalization of methods
This commit is contained in:
@@ -232,7 +232,7 @@ public class AobvTests
|
||||
double[] outputFast = new double[5];
|
||||
double[] outputSlow = new double[5];
|
||||
|
||||
Aobv.Calculate(close, volume, outputFast, outputSlow);
|
||||
Aobv.Batch(close, volume, outputFast, outputSlow);
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
@@ -250,7 +250,7 @@ public class AobvTests
|
||||
double[] outputSlow = new double[2];
|
||||
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
Aobv.Calculate(close, volume, outputFast, outputSlow));
|
||||
Aobv.Batch(close, volume, outputFast, outputSlow));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -262,7 +262,7 @@ public class AobvTests
|
||||
double[] outputSlow = new double[2];
|
||||
|
||||
Assert.Throws<ArgumentException>(() =>
|
||||
Aobv.Calculate(close, volume, outputFast, outputSlow));
|
||||
Aobv.Batch(close, volume, outputFast, outputSlow));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -86,7 +86,7 @@ public class AobvValidationTests
|
||||
var spanFast = new double[close.Length];
|
||||
var spanSlow = new double[close.Length];
|
||||
|
||||
Aobv.Calculate(close, volume, spanFast, spanSlow);
|
||||
Aobv.Batch(close, volume, spanFast, spanSlow);
|
||||
|
||||
ValidationHelper.VerifyData(streamingFast.ToArray(), spanFast, 0, 100, 1e-12);
|
||||
}
|
||||
|
||||
@@ -267,7 +267,7 @@ public sealed class Aobv : ITValuePublisher
|
||||
var vFast = new double[source.Count];
|
||||
var vSlow = new double[source.Count];
|
||||
|
||||
Calculate(source.Close.Values, source.Volume.Values, vFast, vSlow);
|
||||
Batch(source.Close.Values, source.Volume.Values, vFast, vSlow);
|
||||
|
||||
return (new TSeries(t, vFast), new TSeries(t, vSlow));
|
||||
}
|
||||
@@ -284,7 +284,7 @@ public sealed class Aobv : ITValuePublisher
|
||||
/// value seen. If no valid value has been seen yet, 0 is used as a neutral fallback.
|
||||
/// </remarks>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Calculate(ReadOnlySpan<double> close, ReadOnlySpan<double> volume,
|
||||
public static void Batch(ReadOnlySpan<double> close, ReadOnlySpan<double> volume,
|
||||
Span<double> outputFast, Span<double> outputSlow)
|
||||
{
|
||||
if (close.Length != volume.Length)
|
||||
|
||||
Reference in New Issue
Block a user