예제 #1
0
        //D(X,y)
        private double CalculateFieldInPoint(MarkedPointD point)
        {
            //if (SourceSet.Any(source => source.X == point.X && source.Y == point.Y))
            //    return Double.PositiveInfinity; //??????????????????????????????????????????

            return SourceSet.Sum(source => SourceActionFunction(Math.Abs(point.GetDistanceToPoint(source))));
        }
예제 #2
0
        //D(X,y)
        private double CalculateFieldInPoint(MarkedPointD point, params double[] x)
        {
            var SourceSet = new List<MarkedPointD>();
            for (int i = 0; i < c / 2; i++)
            {
                SourceSet.Add(new MarkedPointD(x[i], x[i + c / 2 - 1]));
            }

            if (SourceSet.Any(source => source.X == point.X && source.Y == point.Y))
                return Double.PositiveInfinity;

            return SourceSet.Sum(source => SourceActionFunction(Math.Abs(point.GetDistanceToPoint(source))));
        }