diff --git a/WhiteRabbit/Program.cs b/WhiteRabbit/Program.cs index e8ed761..ea94a7f 100644 --- a/WhiteRabbit/Program.cs +++ b/WhiteRabbit/Program.cs @@ -53,13 +53,14 @@ sourceChars == ToOrderedChars(Encoding.ASCII.GetString(phraseBytes)), $"StringsProcessor produced incorrect anagram: {Encoding.ASCII.GetString(phraseBytes)}"); - var hashVector = ComputeHashVector(phraseBytes); + Console.WriteLine(Encoding.ASCII.GetString(phraseBytes)); + /*var hashVector = ComputeHashVector(phraseBytes); if (Array.IndexOf(expectedHashesAsVectors, hashVector) >= 0) { var phrase = Encoding.ASCII.GetString(phraseBytes); var hash = VectorToHexadecimalString(hashVector); Console.WriteLine($"Found phrase for {hash}: {phrase}; time from start is {stopwatch.Elapsed}"); - } + }*/ #if DEBUG anagramsBag.Add(Encoding.ASCII.GetString(phraseBytes)); @@ -115,6 +116,10 @@ string line; while ((line = Console.ReadLine()) != null) { + if (line.Length == 1 && line != "a" && line != "i") + { + continue; + } yield return Encoding.ASCII.GetBytes(line); } } diff --git a/WhiteRabbit/VectorsProcessor.cs b/WhiteRabbit/VectorsProcessor.cs index 6316e8f..58ca65d 100644 --- a/WhiteRabbit/VectorsProcessor.cs +++ b/WhiteRabbit/VectorsProcessor.cs @@ -106,7 +106,7 @@ var currentVectorInfo = dictionary[i]; if (currentVectorInfo.Vector == remainder) { - yield return ImmutableStack.Create(currentVectorInfo.Index); + //yield return ImmutableStack.Create(currentVectorInfo.Index); } else if (currentVectorInfo.Norm < requiredRemainderPerWord) { @@ -190,6 +190,9 @@ private static IEnumerable GeneratePermutations(T[] original) { + yield return original; + yield break; + /* var length = original.Length; foreach (var permutation in PrecomputedPermutationsGenerator.HamiltonianPermutations(length)) { @@ -200,7 +203,7 @@ } yield return result; - } + }*/ } private struct VectorInfo