Lines Matching refs:weight
17 // weight per element.
19 // The weight for a given element can be changed in O(lg N) time
24 // Alternative: distribution-sampler.h allows O(1) time picking, but no weight
44 // Initializes the elements with a weight of one per element
50 // Pick a random element with probability proportional to its weight.
51 // If total weight is zero, returns -1.
54 // Deterministically pick element x whose weight covers the
59 // Get the weight associated with an element
63 // Set the weight associated with an element
64 // REQUIRES weight >= 0.0f
66 void set_weight(int index, int32 weight);
68 // Get the total combined weight of all elements
74 // Set weight of each element to "weight"
75 void SetAllWeights(int32 weight);
78 // sets the weight of each element i to weight[i].
86 // Any newly added entries have zero weight.
96 // Grow the picker by one and set the weight of the new entry to "weight".
101 void Append(int32 weight);
105 // the weight of the "i"th element. An internal node contains