public void ComparePerf() { var naiveImplementation = NaiveImplementation.Create(_wordDictionary); var precomputed = PrecomputedImplementation.Create(_wordDictionary); RunPerfTest(naiveImplementation, precomputed); }
public static bool TestTransformation(string from, string to) { var wordList = WordList.Create(); var naiveImplementation = NaiveImplementation.Create(wordList); var precomputedImplementation = PrecomputedImplementation.Create(wordList); var naiveResult = naiveImplementation.HasValidTransformation(from, to); var precomputedResult = precomputedImplementation.HasValidTransformation(from, to); Assert.AreEqual(naiveResult, precomputedResult); return(naiveResult); }