예제 #1
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for VANDERMONDE_APPROX_1D_TEST.
    //
    //  Discussion:
    //
    //    VANDERMONDE_APPROX_1D_TEST tests the VANDERMONDE_APPROX_1D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    10 October 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int[]     m_test     = { 0, 1, 2, 3, 4, 5, 9, 12 };
        const int m_test_num = 8;
        int       prob;

        Console.WriteLine("");
        Console.WriteLine("VANDERMONDE_APPROX_1D_TEST:");
        Console.WriteLine("  Test the VANDERMONDE_APPROX_1D library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  The QR_SOLVE library is needed.");
        Console.WriteLine("  The test needs the TEST_INTERP libary.");

        int prob_num = Data_1D.p00_prob_num();

        for (prob = 1; prob <= prob_num; prob++)
        {
            int j;
            for (j = 0; j < m_test_num; j++)
            {
                int m = m_test[j];
                test01(prob, m);
            }
        }

        Console.WriteLine("");
        Console.WriteLine("VANDERMONDE_APPROX_1D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
예제 #2
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for NEAREST_INTERP_1D_TEST.
    //
    //  Discussion:
    //
    //    NEAREST_INTERP_1D_TEST tests the NEAREST_INTERP_1D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    29 May 2013
    //
    //  Author:
    //
    //   John Burkardt
    //
    {
        int prob;

        Console.WriteLine("");
        Console.WriteLine("NEAREST_INTERP_1D_TEST:");
        Console.WriteLine("  Test the NEAREST_INTERP_1D library.");
        Console.WriteLine("  The test needs the TEST_INTERP library.");

        int prob_num = Data_1D.p00_prob_num();

        int ni = 11;

        for (prob = 1; prob <= prob_num; prob++)
        {
            nearest_interp_1d_test01(prob, ni);
        }

        for (prob = 1; prob <= prob_num; prob++)
        {
            nearest_interp_1d_test02(prob);
        }

        Console.WriteLine("");
        Console.WriteLine("NEAREST_INTERP_1D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
예제 #3
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    NEWTON_INTERP_1D_TEST tests the NEWTON_INTERP_1D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    10 July 2015
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int prob;

        Console.WriteLine("");
        Console.WriteLine("NEWTON_INTERP_1D_TEST:");
        Console.WriteLine("  Test the NEWTON_INTERP_1D library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  This test needs the TEST_INTERP library as well.");

        newton_coef_1d_test();

        newton_value_1d_test();

        int prob_num = Data_1D.p00_prob_num();

        for (prob = 1; prob <= prob_num; prob++)
        {
            newton_interp_1d_test01(prob);
        }

        Console.WriteLine("");
        Console.WriteLine("NEWTON_INTERP_1D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
예제 #4
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for BARYCENTRIC_INTERP_1D_TEST.
    //
    //  Discussion:
    //
    //    BARYCENTRIC_INTERP_1D_TEST tests the BARYCENTRIC_INTERP_1D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    30 September 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int i;
        int nd;

        int[] nd_test =
        {
            4, 8, 16, 32, 64, 1000
        }

        ;
        const int nd_test_num = 6;
        int       prob;

        Console.WriteLine("");
        Console.WriteLine("BARYCENTRIC_INTERP_1D_TEST:");
        Console.WriteLine("  Test the BARYCENTRIC_INTERP_1D library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  The tests need the TEST_INTERP_1D library.");

        int prob_num = Data_1D.p00_prob_num();

        for (prob = 1; prob <= prob_num; prob++)
        {
            for (i = 0; i < nd_test_num; i++)
            {
                nd = nd_test[i];
                lagcheby1_interp_1d_test(prob, nd);
            }
        }

        for (prob = 1; prob <= prob_num; prob++)
        {
            for (i = 0; i < nd_test_num; i++)
            {
                nd = nd_test[i];
                lagcheby2_interp_1d_test(prob, nd);
            }
        }

        for (prob = 1; prob <= prob_num; prob++)
        {
            for (i = 0; i < nd_test_num; i++)
            {
                nd = nd_test[i];
                lageven_interp_1d_test(prob, nd);
            }
        }

        Console.WriteLine("");
        Console.WriteLine("BARYCENTRIC_INTERP_1D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
예제 #5
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for LAGRANGE_APPROX_1D_TEST.
    //
    //  Discussion:
    //
    //    LAGRANGE_APPROX_1D_TEST tests the LAGRANGE_APPROX_1D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    09 October 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int j;
        int k;
        int m;

        int[] m_test =
        {
            0, 1, 2, 3, 4, 8, 16
        }

        ;
        const int m_test_num = 7;
        int       nd;

        int[] nd_test =
        {
            16, 64, 1000
        }

        ;
        const int nd_test_num = 3;
        int       prob;

        Console.WriteLine("");
        Console.WriteLine("LAGRANGE_APPROX_1D_TEST:");
        Console.WriteLine("  Test the LAGRANGE_APPROX_1D library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  The QR_SOLVE library is needed.");
        Console.WriteLine("  These tests need the TEST_INTERP_1D library.");

        int prob_num = Data_1D.p00_prob_num();

        for (prob = 1; prob <= prob_num; prob++)
        {
            for (j = 0; j < m_test_num; j++)
            {
                m = m_test[j];
                for (k = 0; k < nd_test_num; k++)
                {
                    nd = nd_test[k];
                    test02(prob, m, nd);
                }
            }
        }

        for (prob = 1; prob <= prob_num; prob++)
        {
            for (j = 0; j < m_test_num; j++)
            {
                m = m_test[j];
                for (k = 0; k < nd_test_num; k++)
                {
                    nd = nd_test[k];
                    test03(prob, m, nd);
                }
            }
        }

        //
        //  Terminate.
        //
        Console.WriteLine("");
        Console.WriteLine("LAGRANGE_APPROX_1D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }
예제 #6
0
    private static void Main()
    //****************************************************************************80
    //
    //  Purpose:
    //
    //    MAIN is the main program for LAGRANGE_INTERP_1D_TEST.
    //
    //  Discussion:
    //
    //    LAGRANGE_INTERP_1D_TEST tests the LAGRANGE_INTERP_1D library.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    14 October 2012
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        const int nd_test_num = 6;

        int j;
        int nd;

        int[] nd_test =
        {
            4, 8, 16, 32, 64, 256
        }

        ;
        int prob;

        Console.WriteLine("");
        Console.WriteLine("LAGRANGE_INTERP_1D_TEST:");
        Console.WriteLine("  Test the LAGRANGE_INTERP_1D library.");
        Console.WriteLine("  The R8LIB library is needed.");
        Console.WriteLine("  These tests need the TEST_INTERP_1D library.");

        int prob_num = Data_1D.p00_prob_num();

        for (prob = 1; prob <= prob_num; prob++)
        {
            for (j = 0; j < nd_test_num; j++)
            {
                nd = nd_test[j];
                test01(prob, nd);
            }
        }

        for (prob = 1; prob <= prob_num; prob++)
        {
            for (j = 0; j < nd_test_num; j++)
            {
                nd = nd_test[j];
                test02(prob, nd);
            }
        }

        //
        //  Terminate.
        //
        Console.WriteLine("");
        Console.WriteLine("LAGRANGE_INTERP_1D_TEST:");
        Console.WriteLine("  Normal end of execution.");
        Console.WriteLine("");
    }