Exemplo n.º 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("");
        }