public static void ytb_next_test() //****************************************************************************80 // // Purpose: // // YTB_NEXT_TEST tests YTB_NEXT. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 October 2006 // // Author: // // John Burkardt // { const int N = 6; int i; int[] a = new int[N]; int[] lambda = { 3, 2, 1, 0, 0, 0 } ; for (i = 0; i < N; i++) { a[i] = 0; } Console.WriteLine(""); Console.WriteLine("YTB_NEXT_TEST"); Console.WriteLine(" YTB_NEXT generates Young tableaus."); Console.WriteLine(""); bool more = false; i = 0; for (;;) { i += 1; YoungTableau.ytb_next(N, ref lambda, ref a, ref more); YoungTableau.ytb_print(N, a, " "); if (!more || 100 < i) { break; } } }
public static void ytb_random_test() //****************************************************************************80 // // Purpose: // // YTB_RANDOM_TEST tests YTB_RANDOM. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 October 2006 // // Author: // // John Burkardt // { const int N = 6; int[] a = new int[N]; int i; int[] lambda = { 3, 2, 1, 0, 0, 0 } ; Console.WriteLine(""); Console.WriteLine("YTB_RANDOM_TEST"); Console.WriteLine(" YTB_RANDOM generates a random Young tableau"); int seed = 123456789; for (i = 1; i <= 5; i++) { YoungTableau.ytb_random(N, lambda, ref seed, ref a); YoungTableau.ytb_print(N, a, " "); } }
public static void perm0_to_ytb_test() //****************************************************************************80 // // Purpose: // // PERM0_TO_YTB_TEST tests PERM0_TO_YTB. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 15 June 2015 // // Author: // // John Burkardt // { const int N = 7; int[] a = new int[N]; int[] lambda = new int[N]; int[] p = { 7, 2, 4, 1, 5, 3, 6 }; Console.WriteLine(""); Console.WriteLine("PERM0_TO_YTB_TEST"); Console.WriteLine(" PERM0_TO_YTB converts a permutation of (0,...,N-1) to a"); Console.WriteLine(" Young tableau."); Permutation.perm0_print(N, p, " The permutation:"); Permutation.perm0_to_ytb(N, p, ref lambda, ref a); YoungTableau.ytb_print(N, a, " The Young tableau:"); }
public static void ytb_enum_test() //****************************************************************************80 // // Purpose: // // YTB_ENUM_TEST tests YTB_ENUM. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 11 October 2006 // // Author: // // John Burkardt // { int n; Console.WriteLine(""); Console.WriteLine("YTB_ENUM_TEST"); Console.WriteLine(" YTB_ENUM counts Young tableau."); Console.WriteLine(""); Console.WriteLine(" N YTB_ENUM(N)"); Console.WriteLine(""); for (n = 0; n <= 10; n++) { Console.WriteLine(n.ToString().PadLeft(4) + " " + YoungTableau.ytb_enum(n).ToString().PadLeft(10) + ""); } }