public static void Test03c() { PartitionSet set = PartitionsCalculator.Calculate(7); set.SortDescending(); Console.WriteLine(set); }
public static void Test02b() { PartitionSet ps = new PartitionSet(3); // add partitions of number 3 manually // (note order of 'Insert' calls) Partition p; p = new Partition(new int[] { 1, 1, 1 }); ps.Insert(p); p = new Partition(new int[] { 2, 1 }); ps.Insert(p); p = new Partition(new int[] { 3 }); ps.Insert(p); ps.SortDescending(); // sorting partitions Console.WriteLine(ps); }