Esempio n. 1
0
    public static void pn_pair_product_test(int p)

    //****************************************************************************80
    //
    //  Purpose:
    //
    //    PN_PAIR_PRODUCT_TEST tests PN_PAIR_PRODUCT.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    14 March 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    //  Parameters:
    //
    //    Input, int P, the maximum degree of the polynomial
    //    factors.
    //
    {
        Console.WriteLine("");
        Console.WriteLine("PN_PAIR_PRODUCT_TEST:");
        Console.WriteLine("  PN_PAIR_PRODUCT_TEST computes a pair product table for Pn(n,x).");
        Console.WriteLine("");
        Console.WriteLine("  Tij = integral ( -1.0 <= X <= +1.0 ) Pn(I,X) Pn(J,X) dx");
        Console.WriteLine("");
        Console.WriteLine("  where Pn(I,X) = normalized Legendre polynomial of degree I.");
        Console.WriteLine("");
        Console.WriteLine("  Maximum degree P = " + p + "");

        double[] table = Legendre.pn_pair_product(p);

        typeMethods.r8mat_print(p + 1, p + 1, table, "  Pair product table:");
    }