コード例 #1
0
        public double functional(double n, double d)
        {
            //if (n <= 0 || d <= 0){ Random r=new Random(1); return r.Next()* 10e30;}
            calsData.changeParams(new Complex(n, 0), d);
            Complex x1 = expData.Rho;
            Complex x2 = calsData.PhoExp();
            double  t = Math.Atan(x1.Modulus);
            double  t1 = Math.Atan(x2.Modulus);
            double  c = (Complex.Log(x1 / x1.Modulus)).imag;
            double  c1 = (Complex.Log(x2 / x2.Modulus)).imag;
            double  k = (t - t1) * (t - t1), k1 = (c - c1) * (c - c1);

            return
                (k + k1);
        }
コード例 #2
0
        public double functional(double n, double d, ref double psi, ref double delta)
        {
            //if (n <= 0 || d <= 0){ Random r=new Random(1); return r.Next()* 10e30;}
            calsData.changeParams(new Complex(n, 0), d);
            Complex x1 = expData.Rho;
            Complex x2 = calsData.PhoExp();

            psi   = Math.Atan(x2.Modulus) * 180 / Math.PI;
            delta = x2.Argument * 180 / Math.PI;
            double k  = (Math.Atan(x1.Modulus) - Math.Atan(x2.Modulus)) * (Math.Atan(x1.Modulus) - Math.Atan(x2.Modulus)),
                   k1 = (x1.Argument - x2.Argument) * (x1.Argument - x2.Argument);

            return
                (Math.Log(k + k1));
        }