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