Beispiel #1
0
    public static void hermite_poly_phys_values_test()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    HERMITE_POLY_PHYS_VALUES_TEST tests HERMITE_POLY_PHYS_VALUES.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    13 February 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        double fx = 0;
        int    n  = 0;
        double x  = 0;

        Console.WriteLine("");
        Console.WriteLine("HERMITE_POLY_PHYS_VALUES_TEST");
        Console.WriteLine("  HERMITE_POLY_PHYS_VALUES stores values of");
        Console.WriteLine("  the physicist's Hermite polynomials.");
        Console.WriteLine("");
        Console.WriteLine("     N      X            H(N,X)");
        Console.WriteLine("");
        int n_data = 0;

        for (;;)
        {
            Hermite.hermite_poly_phys_values(ref n_data, ref n, ref x, ref fx);
            if (n_data == 0)
            {
                break;
            }

            Console.WriteLine("  "
                              + n.ToString(CultureInfo.InvariantCulture).PadLeft(6) + "  "
                              + x.ToString(CultureInfo.InvariantCulture).PadLeft(12) + "  "
                              + fx.ToString("0.################").PadLeft(24) + "");
        }
    }