public void AddSolvable(WordEquivalencyClassComposition wordEquivalencyClassComposition) { var charPool = wordEquivalencyClassComposition.CharPool; if (ContainsKey(charPool)) { throw new ArgumentException("I should not be here."); return; } var compositionAlternatives = CompositionAlternatives.NotDeadend(wordEquivalencyClassComposition); _dict.Add(charPool, compositionAlternatives); }
public void AddSolution(WordEquivalencyClassComposition wordEquivalencyClassComposition) { var charPool = wordEquivalencyClassComposition.CharPool; if (!ContainsKey(charPool)) { var compositionAlternatives = new CompositionAlternatives(wordEquivalencyClassComposition); _dict.Add(charPool, compositionAlternatives); } else { //todo must check if this is duplicate structure that i am adding (optimisation) _dict[charPool].AddAlternative(wordEquivalencyClassComposition); } }