1 write to _cache
Microsoft.ML.Core (1)
Utilities\ReservoirSampler.cs (1)
156_cache = new T[size];
12 references to _cache
Microsoft.ML.Core (12)
Utilities\ReservoirSampler.cs (12)
145public int Size { get { return _numSampled <= _cache.Length ? (int)_numSampled : _cache.Length; } } 169if (_numSampled <= _cache.Length) 171_getter(ref _cache[_numSampled - 1]); 174if (_numSampled == _cache.Length) 176for (int i = 0; i < _cache.Length; i++) 178_reservoir[i] = _rnd.Next(_cache.Length); 186int k = Stats.SampleFromBinomial(_rnd, _cache.Length, 1.0 / _numSampled); 203_getter(ref _cache[_reservoir[ind]]); 225return _cache; 233for (int i = 0; i < _cache.Length; i++) 251yield return _cache[ind];