Example #1
0
        private void buttonRun_Click(object sender, EventArgs e)
        {
            seq = comboBoxOEIS.SelectedIndex;
            if (seq > 0)
            {
                var oeis = Generator.oeis;
                WriteLineToBox(oeis[seq - 1].Item1);
            }

            if (n != lastn)
            {
                tree  = Partitions.PartitionTree(n);
                lastn = n;
            }

            var tour = new Tour(tree);

            Generator.Traverse(tour, traversal, visitor, direction);
            var count = tree.Count(tree.GetRoot()).ToString();

            WriteLineToBox("Number of partitions: " + count);
            WriteLineToBox("");
        }
Example #2
0
        // Reverse-conjugate visitor
        private static void ReversedConjugatedPartition(Partition partition)
        {
            var p = Partitions.Reverse(Partitions.Conjugate(partition));

            PrintPartition(p);
        }
Example #3
0
        // Conjugate visitor
        private static void ConjugatedPartition(Partition partition)
        {
            var p = Partitions.Conjugate(partition);

            PrintPartition(p);
        }