示例#1
0
    public static void p_exponential_product_test(int p, double b)

    //****************************************************************************80
    //
    //  Purpose:
    //
    //    P_EXPONENTIAL_PRODUCT_TEST tests P_EXPONENTIAL_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.
    //
    //    Input, double B, the coefficient of X in the exponential factor.
    //
    {
        Console.WriteLine("");
        Console.WriteLine("P_EXPONENTIAL_PRODUCT_TEST");
        Console.WriteLine("  P_EXPONENTIAL_PRODUCT_TEST computes a Legendre exponential product table.");
        Console.WriteLine("");
        Console.WriteLine("  Tij = integral ( -1.0 <= X <= +1.0 ) exp(B*X) P(I,X) P(J,X) dx");
        Console.WriteLine("");
        Console.WriteLine("  where P(I,X) = Legendre polynomial of degree I.");

        Console.WriteLine("");
        Console.WriteLine("  Maximum degree P = " + p + "");
        Console.WriteLine("  Exponential argument coefficient B = " + b + "");

        double[] table = Legendre.p_exponential_product(p, b);

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