Example #1
0
 /// <summary>
 /// Create a generator given a weighted list of names
 /// </summary>
 /// <param name="order">Order of the internal markov chain</param>
 /// <param name="names">List of weighted names to base generator on</param>
 public Generator(int order, IEnumerable <WeightedName> wnames)
 {
     _chain = new MarkovChain(order);
     foreach (var wn in wnames)
     {
         _chain.Add(wn.Name, wn.Weight);
         _originalNames[wn.Name] = true;
     }
 }
Example #2
0
 /// <summary>
 /// Create a generator given a list of names
 /// </summary>
 /// <param name="order">Order of the internal markov chain</param>
 /// <param name="names">List of names to base generator on</param>
 public Generator(int order, IEnumerable <string> names)
 {
     _chain = new MarkovChain(order);
     foreach (var name in names)
     {
         _chain.Add(name, 1);
         _originalNames[name] = true;
     }
 }