Example #1
0
 public WeightedDraw(IEnumerable <int> weights, IDrawer.RandomFunc random)
     : this(Convert(weights), random)
 {
 }
Example #2
0
 public WeightedDraw(IEnumerable <float> weights, IDrawer.RandomFunc random)
 {
     this.random  = random;
     this.weights = Cumulate(weights);
     Debug.Assert(this.weights.Count > 0, "No possible elements");
 }
Example #3
0
 public UniformDraw(int count, IDrawer.RandomFunc random)
 {
     this.count  = count;
     this.random = random;
 }