Searched refs:WeightedPicker (Results 1 - 4 of 4) sorted by relevance

/external/tensorflow/tensorflow/core/lib/random/
H A Dweighted_picker.h41 class WeightedPicker { class in namespace:tensorflow::random
45 explicit WeightedPicker(int N);
48 ~WeightedPicker();
90 // allocate a new WeightedPicker of the appropriate size.
117 TF_DISALLOW_COPY_AND_ASSIGN(WeightedPicker);
120 inline int32 WeightedPicker::get_weight(int index) const {
126 inline int32 WeightedPicker::total_weight() const { return level_[0][0]; }
128 inline int WeightedPicker::num_elements() const { return N_; }
H A Dweighted_picker_test.cc32 static void CheckUniform(SimplePhilox* rnd, WeightedPicker* picker, int trials);
33 static void CheckSkewed(SimplePhilox* rnd, WeightedPicker* picker, int trials);
36 TEST(WeightedPicker, Simple) {
42 WeightedPicker picker(0);
48 WeightedPicker picker(1);
56 WeightedPicker picker(0);
65 WeightedPicker picker(1);
74 WeightedPicker picker(1);
92 TEST(WeightedPicker, BigWeights) {
96 WeightedPicker picke
[all...]
H A Dweighted_picker.cc26 WeightedPicker::WeightedPicker(int N) { function in class:tensorflow::random::WeightedPicker
45 WeightedPicker::~WeightedPicker() {
100 int WeightedPicker::Pick(SimplePhilox* rnd) const {
109 int WeightedPicker::PickAt(int32 weight_index) const {
133 void WeightedPicker::set_weight(int index, int32 weight) {
145 void WeightedPicker::SetAllWeights(int32 weight) {
155 void WeightedPicker::SetWeightsFromArray(int N, const int32* weights) {
167 void WeightedPicker
[all...]
/external/tensorflow/tensorflow/core/kernels/
H A Drange_sampler.h177 random::WeightedPicker picker_;

Completed in 119 milliseconds