Beispiel #1
0
 public WeightedRandom(AbstractRandomProvider provider) : this(WeightAlgorithm.FairBiased)
 {
     _randomProvider = provider ?? throw new Exception("Random provider is not instantiated.");
 }
Beispiel #2
0
 private WeightedRandom(AbstractRandomProvider provider, WeightAlgorithm algorithm)
 {
     _randomProvider = provider ?? throw new Exception("Random provider is not instantiated.");
     this.algorithm  = algorithm;
 }
Beispiel #3
0
 private WeightedRandom(WeightAlgorithm algorithm)
 {
     _randomProvider = new SystemRandomProvider();
     this.algorithm  = algorithm;
 }