Exemplo n.º 1
0
    private static void sgmga_aniso_normalize_test(int dim_num, double[] level_weight)

    //****************************************************************************80
    //
    //  Purpose:
    //
    //    SGMGA_ANISO_NORMALIZE_TEST calls SGMGA_ANISO_NORMALIZE.
    //
    //  Licensing:
    //
    //    This code is distributed under the GNU LGPL license.
    //
    //  Modified:
    //
    //    27 November 2009
    //
    //  Author:
    //
    //    John Burkardt
    //
    {
        int dim;
        int option;

        Console.WriteLine("");
        Console.WriteLine("SGMGA_ANISO_NORMALIZE_TEST");
        Console.WriteLine("  Input weight sum: "
                          + typeMethods.r8vec_sum(dim_num, level_weight) + "");
        string cout = "";

        for (dim = 0; dim < dim_num; dim++)
        {
            cout += "  " + level_weight[dim].ToString(CultureInfo.InvariantCulture).PadLeft(12);
        }

        Console.WriteLine(cout);

        for (option = 0; option <= 2; option++)
        {
            SGMGAniso.sgmga_aniso_normalize(option, dim_num, ref level_weight);

            Console.WriteLine("  For OPTION = " + option
                              + "  Normalized weight sum: "
                              + typeMethods.r8vec_sum(dim_num, level_weight) + "");
            cout = "";
            for (dim = 0; dim < dim_num; dim++)
            {
                cout += "  " + level_weight[dim].ToString(CultureInfo.InvariantCulture).PadLeft(12);
            }

            Console.WriteLine(cout);
        }
    }