public void CompareTestSameArrayLinearLong() { List <double> source = new List <double>(); List <double> target = new List <double>(); double tolerance = 0.01; double epsilon = 0.001; for (int i = 0; i < 100000000; i++) { source.Add(i); target.Add(i); } double[] sourceDoubles = source.ToArray(); double[] targetDoubles = target.ToArray(); var testing = new X86Mathematics(); var retCompare = testing.LinearCompareAbslute(sourceDoubles, targetDoubles, tolerance, epsilon); Assert.AreEqual(0, retCompare.Item1); }
public void CompareTestDifferencesTooSmall() { List <double> source = new List <double>(); List <double> target = new List <double>(); double tolerance = 0.01; double epsilon = 0.001; for (double i = 0; i < 10; i++) { source.Add(1); target.Add(1 + epsilon); } double[] sourceDoubles = source.ToArray(); double[] targetDoubles = target.ToArray(); var testing = new X86Mathematics(); var retCompare = testing.CompareAbsolute(sourceDoubles, targetDoubles, tolerance, epsilon); Assert.AreEqual(0, retCompare.Item1); }
public void CompareTestSingleNotFailure() { List <double> source = new List <double>(); List <double> target = new List <double>(); double tolerance = 0.01; double epsilon = 0.01; for (double i = 0; i < 10; i++) { source.Add(1); target.Add(1); } target[0] = 1 + tolerance - epsilon; var testing = new X86Mathematics(); double[] sourceDoubles = source.ToArray(); double[] targetDoubles = target.ToArray(); var retCompare = testing.CompareAbsolute(sourceDoubles, targetDoubles, tolerance, epsilon); Assert.AreEqual(0, retCompare.Item1); }
public void Cleanup() { mathematics = null; }
public void Initialize() { mathematics = new X86Mathematics(); }
public void CanInitialize() { var testing = new X86Mathematics(); }
public void CanInitialize() { var testing = new X86Mathematics(); Assert.IsNotNull(testing); }