private static ObservablePoint[] GetValues(IFuzzyFunction function, int numberOfPoints)
        {
            List <ObservablePoint> points = new List <ObservablePoint>();

            double step = (function.MaxInputValue - function.MinInputValue) / (double)numberOfPoints;

            for (double x = function.MinInputValue; x <= function.MaxInputValue; x += step)
            {
                points.Add(new ObservablePoint(x, function.GetValue(x)));
            }

            return(points.ToArray());
        }
示例#2
0
 protected override double Function(double x)
 {
     return(Crop(mTargetFunction.GetValue(x)));
 }