private void updateRange()
        {
            range = new DoubleRange(0, 1);

            try
            {
                range = instance.Support;
                range = instance.GetRange(0.99);
            }
            catch
            {
            }

            if (range.Length == 0)
            {
                range = new DoubleRange(instance.Mean - 1, instance.Mean + 1);
            }

            double resolution = 100;

            this.unit          = new DoubleRange(0, 1);
            this.probabilities = Vector.Range(0.0, 1.0, 1.0 / resolution);

            if (instance is UnivariateDiscreteDistribution)
            {
                this.supportPoints = Vector.Range(range.Min, range.Max, 1.0);
            }
            else
            {
                double min = range.Min - Math.Abs(range.Length) * 0.1;
                double max = range.Max + Math.Abs(range.Length) * 0.1;

                this.range = new DoubleRange(min, max);

                this.supportPoints = Vector.Range(range.Min, range.Max, range.Length / resolution);

                // make sure the support points include the important metrics

                concatenate(() => instance.Mean);
                concatenate(() => instance.Median);
                concatenate(() => instance.Mode);
                Array.Sort(supportPoints);
            }
        }