Exemple #1
0
 internal SingleSelector(WeightedSelector <T> weightedSelector) : base(weightedSelector)
 {
 }
 internal SelectorBase(WeightedSelector <T> weightedSelector)
 {
     WeightedSelector = weightedSelector;
 }
Exemple #3
0
 public static int TotalWeight <T>(this WeightedSelector <T> selector)
 {
     return(selector.Items.Count == 0 ? 0 : selector.Items.Sum(t => t.Weight));
 }
Exemple #4
0
 internal MultipleSelector(WeightedSelector <T> weightedSelector) : base(weightedSelector)
 {
 }
Exemple #5
0
 public static List <WeightedItem <T> > OrderByWeightAscending <T>(this WeightedSelector <T> selector)
 {
     return(selector.Items.OrderBy(item => item.Weight).ToList());
 }