Esempio n. 1
0
 public WordPool(ShortCalculator calculator, IEnumerable <string> words = null)
 {
     this.calculator = calculator;
     this.words      = words?.ToHashSet() ?? new();
     this.keys       = words.ToDictionary(w => w, w => calculator.Calc(w).ToHashSet());
 }
 public WordsShortCalculator(ShortCalculator calculator, IComparer <string> comparator)
 {
     this.calculator = calculator;
     this.comparator = comparator;
 }