public ProbabilityDistributionCalculator()
        {
            _massBins = Enumerable.Range(0, 31).Select(x => 500 + x * 1000).ToArray();
            _massBins[_massBins.Length - 1] = 30000;
            _densityEstimators = new KernelDensityEstimator[_massBins.Length];

            for (var i = 0; i < _densityEstimators.Length; i++)
            {
                _densityEstimators[i] = new KernelDensityEstimator();
            }
        }
        public ProbabilityDistributionCalculator()
        {
            _massBins = Enumerable.Range(0, 31).Select(x => 500 + x * 1000).ToArray();
            _massBins[_massBins.Length - 1] = 30000;
            _densityEstimators = new KernelDensityEstimator[_massBins.Length];

            for (var i = 0; i < _densityEstimators.Length; i++)
            {
                _densityEstimators[i] = new KernelDensityEstimator();
            }
        }
        public void TestKernel()
        {
            var methodName = MethodBase.GetCurrentMethod().Name;
            TestUtils.ShowStarting(methodName);

            var x = new [] {.2, .3};
            var y = new [] { .1, .4};
            var z = new [] {.3, .4};

            var kernelEstimator = new KernelDensityEstimator();
            //kernelEstimator.AddObservation(x);
            //kernelEstimator.AddObservation(y);
            Console.WriteLine(kernelEstimator.HasObservation());
            var estimation = kernelEstimator.GetDensityEstimation(z, .1, 0);
            if (estimation == null) return;
            foreach (var e in estimation)
            {
                Console.WriteLine(e);
            }
        }