1 write to _cache
Microsoft.ML.Core (1)
Utilities\ReservoirSampler.cs (1)
77_cache = new T[size];
9 references to _cache
Microsoft.ML.Core (9)
Utilities\ReservoirSampler.cs (9)
66public int Size { get { return _numSampled <= _cache.Length ? (int)_numSampled : _cache.Length; } } 89if (_numSampled <= _cache.Length) 90_getter(ref _cache[_numSampled - 1]); 91else if (_rnd.NextDouble() * _numSampled < _cache.Length) 94int ind = _rnd.Next(_cache.Length); 95_getter(ref _cache[ind]); 114if (i == _cache.Length) 116yield return _cache[i];