Exemple #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");
            }
        }
Exemple #2
0
 private static NummerMerkingSolution MerkNummer(bool[] numberText, int minSequenceLength, int maxSequenceLength) => Nummernmerker.MerkNummern(numberText, minSequenceLength, maxSequenceLength);