예제 #1
0
 public static decimal A1(decimal t, decimal tay)
 {
     if (t != tay)
     {
         return(VectorHelper.Mult(
                    VectorHelper.Div(
                        Parametrization_ND.X0(tay),
                        Parametrization_ND.X0(t)),
                    Normal.GetNormal(t,
                                     Parametrization_ND.X01d,
                                     Parametrization_ND.X02d))
                / (decimal)Math.Pow(
                    (double)Normal.GetModul(
                        VectorHelper.Div(
                            Parametrization_ND.X0(t),
                            Parametrization_ND.X0(tay)))
                    , 2));
     }
     else
     {
         return(VectorHelper.Mult(
                    new[] { Parametrization_ND.X01d2(t), Parametrization_ND.X02d2(t) },
                    Normal.GetNormal(t,
                                     Parametrization_ND.X01d,
                                     Parametrization_ND.X02d))
                / (2M * (decimal)Math.Pow(
                       (double)Normal.GetModul(new[]
         {
             Parametrization_ND.X01d(t),
             Parametrization_ND.X02d(t)
         })
                       , 2)));
     }
 }
예제 #2
0
 public static decimal H01(decimal t, decimal tay)
 {
     if (t != tay)
     {
         return((decimal)Math.Log(4 / Math.E *
                                  Math.Pow(
                                      Math.Sin(
                                          (double)(t - tay) / 2
                                          ), 2)
                                  / Math.Pow((double)Normal.GetModul(
                                                 VectorHelper.Div(
                                                     Parametrization_ND.X0(t),
                                                     Parametrization_ND.X0(tay))), 2)) / 2);
     }
     else
     {
         return((decimal)Math.Log(1 /
                                  (Math.E * Math.Pow((double)
                                                     Normal.GetModul(new[]
         {
             Parametrization_ND.X01d(t),
             Parametrization_ND.X02d(t)
         })
                                                     , 2))) / 2);
     }
 }
예제 #3
0
        public decimal[] CalculatePochidnaG0()
        {
            var res = new decimal[2 * Parameters.M];

            for (var j = 0; j < 2 * Parameters.M; j++)
            {
                decimal sum1 = 0;
                decimal sum2 = 0;

                var dod1 = (-destiny[j]) / (2M * Normal.GetModul(new[]
                {
                    Parametrization_ND.X01d(t[j]),
                    Parametrization_ND.X02d(t[j])
                }));
                //Normal.GetModul(t[j], Parametrization_ND.X01d, Parametrization_ND.X02d));
                for (var k = 0; k < 2 * Parameters.M; k++)
                {
                    sum1 += (destiny[k] * Kernels_DN.A1(t[j], t[k]));
                    sum2 += (destiny[k + 2 * Parameters.M] * Kernels_DN.A2(t[j], t[k]));
                }

                //res[j] = dod1 + (sum1 + sum2) / (2M * Parameters.M);
                res[j] = (sum1 + sum2) / (2M * Parameters.M);
            }

            return(res);
        }
예제 #4
0
 private decimal GetDod1(int j)
 {
     return(1M / 2M * Normal.GetModul(new[]
     {
         Parametrization_ND.X01d(t[j]),
         Parametrization_ND.X02d(t[j])
     }));
 }
예제 #5
0
        private static decimal[] GetH_0()
        {
            var res = new decimal[2 * Parameters.M];

            for (int i = 0; i < res.Length; i++)
            {
                var t    = (decimal)((decimal)i * (decimal)Math.PI) / (decimal)Parameters.M;
                var dod1 = 2M * Parametrization_ND.X01(t) * Parametrization_ND.X02d(t) / Normal.GetModul(new[]
                {
                    Parametrization_ND.X01d(t),
                    Parametrization_ND.X02d(t)
                });

                var dod2 = 2M * Parametrization_ND.X02(t) * Parametrization_ND.X01d(t) / Normal.GetModul(new[]
                {
                    Parametrization_ND.X01d(t),
                    Parametrization_ND.X02d(t)
                });

                res[i] = dod1 + dod2;
            }

            return(res);
        }
예제 #6
0
        private decimal ErrorL(decimal[] ex, decimal[] nabl)
        {
            var error = 0.0M;

            for (int i = 0; i < 2 * Parameters.M; i++)
            {
                var t = (decimal)((decimal)i * (decimal)Math.PI) / (decimal)Parameters.M;
                error += ((decimal)Math.Pow((double)(ex[i] - nabl[i]), 2) * Normal.GetModul(new [] { Parametrization_ND.X01d(t), Parametrization_ND.X02d(t) }));
            }

            return((decimal)Math.Sqrt((double)(error / (2M * Parameters.M))));
        }