Searched refs:get_weight (Results 1 – 4 of 4) sorted by relevance
61 int32 get_weight(int index) const;120 inline int32 WeightedPicker::get_weight(int index) const { in get_weight() function
138 const int32 delta = weight - get_weight(index); in set_weight()
190 return static_cast<float>(picker_.get_weight(value)) / picker_.total_weight(); in Probability()198 picker_.set_weight(value, picker_.get_weight(value) + 1); in Update()
1065 fn get_weight<T>(item: &(u32, T)) -> u32 { in test_weighted() function1074 let item = items.choose_weighted(&mut r, get_weight).unwrap(); in test_weighted()1085 items.choose_weighted_mut(&mut r, get_weight).unwrap().1 += 1; in test_weighted()