Exemplo 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());
 }
Exemplo n.º 2
0
 public WordsShortCalculator(ShortCalculator calculator, IComparer <string> comparator)
 {
     this.calculator = calculator;
     this.comparator = comparator;
 }