public void GetValue_ExponentialFunction_BenchmarkResult(IOneDimNumericalConstAbscissaIntegratorAlgorithm numericalIntegrator)
        {
            double lowerBound = 1.0;
            double upperBound = 10.0;

            Assume.That(numericalIntegrator.TrySetBounds(lowerBound, upperBound) == true, String.Format("1-dimensional Integrator {0} does not support individual lower/upper bounds", numericalIntegrator.Factory.Name.String));

            numericalIntegrator.FunctionToIntegrate = (x_k, k) => Math.Exp(x_k);

            double expected = Math.Exp(upperBound) - Math.Exp(lowerBound);
            double actual   = numericalIntegrator.GetValue();

            Assert.That(actual, Is.EqualTo(expected).Within(1E-5), String.Format("1-dimensional integrator {0}.", numericalIntegrator.Factory.Name.String));
        }
        public void GetValue_ThreeTimesXSquare_BenchmarkResult(IOneDimNumericalConstAbscissaIntegratorAlgorithm numericalIntegrator)
        {
            double lowerBound = 1.0;
            double upperBound = 10.0;

            Assume.That(numericalIntegrator.TrySetBounds(lowerBound, upperBound) == true, String.Format("1-dimensional Integrator {0} does not support individual lower/upper bounds", numericalIntegrator.Factory.Name.String));

            var xValues = numericalIntegrator.Abscissas.ToArray();
            var individualTestValues = new double[xValues.Length];

            numericalIntegrator.FunctionToIntegrate = (x_k, k) => 3.0 * x_k * x_k;

            double expected = upperBound * upperBound * upperBound - lowerBound * lowerBound * lowerBound;
            double actual   = numericalIntegrator.GetValue();

            Assert.That(actual, Is.EqualTo(expected).Within(1E-5), String.Format("1-dimensional integrator {0}.", numericalIntegrator.Factory.Name.String));
        }