GetRange() статический приватный Метод

static private GetRange ( double>.Func source, DoubleRange &range ) : bool
source double>.Func
range DoubleRange
Результат bool
Пример #1
0
        private static DataSeriesBox show(String title, Func <double, double> function, double?min, double?max, double?step, int?npoints)
        {
            if (min == null || max == null)
            {
                DoubleRange range;
                if (ScatterplotBox.GetRange(function, out range))
                {
                    min = range.Min;
                    max = range.Max;
                }
                else
                {
                    min = 0;
                    max = 1;
                }
            }

            if (npoints == null)
            {
                npoints = 1000;
            }

            if (step == null)
            {
                step = (max - min) / npoints;
            }

            double[] input  = Vector.Interval(min.Value, max.Value, step.Value);
            double[] output = Matrix.Apply(input, function);

            return(show(title, input, new[] { output }));
        }