예제 #1
0
        private static void RunCore(string numberText, int minSequenceLength, int maxSequenceLength)
        {
            Console.WriteLine("Starting splitting of number " + numberText + " with segments of length " + minSequenceLength + ".." + maxSequenceLength);
            Console.WriteLine("  Digits:             " + numberText.Length);

            var result = Nummernmerker.MerkNummern(numberText, minSequenceLength, maxSequenceLength);

            Console.WriteLine("Results: ");

            if (result.IsSuccessful)
            {
                Console.WriteLine("  Leading zeros hit:  " + result.LeadingZerosHit);
                Console.WriteLine("  Final distribution: " + string.Join(' ', result.ApplyDistribution(numberText)));
            }
            else
            {
                Console.WriteLine("  Failure");
            }
        }
예제 #2
0
 private static NummerMerkingSolution MerkNummer(bool[] numberText, int minSequenceLength, int maxSequenceLength) => Nummernmerker.MerkNummern(numberText, minSequenceLength, maxSequenceLength);
예제 #3
0
 public void IterationCleanup() => Nummernmerker.ClearCache();