1 write to _reservoir
Microsoft.ML.Core (1)
Utilities\ReservoirSampler.cs (1)
158_reservoir = new int[size];
20 references to _reservoir
Microsoft.ML.Core (20)
Utilities\ReservoirSampler.cs (20)
178_reservoir[i] = _rnd.Next(_cache.Length); 179_counts[_reservoir[i]]++; 190int ind = _rnd.Next(_reservoir.Length); 193if (_counts[_reservoir[ind]] > 1) 197_counts[_reservoir[ind]]--; 198_reservoir[ind] = tmp.Value; 201else if (_counts[_reservoir[ind]] == 0) 202_counts[_reservoir[ind]]++; 203_getter(ref _cache[_reservoir[ind]]); 207var next = _rnd.Next(_reservoir.Length); 208if (_reservoir[next] == _reservoir[ind]) 210_counts[_reservoir[next]]--; 211_reservoir[next] = _reservoir[ind]; 212_counts[_reservoir[next]]++; 230if (!_locked && _numSampled < _reservoir.Length) 235_reservoir[i] = _rnd.Next((int)_numSampled); 236_counts[_reservoir[i]]++; 250foreach (var ind in _reservoir)