1 write to _numSampled
Microsoft.ML.Core (1)
Utilities\ReservoirSampler.cs (1)
166
_numSampled
++;
9 references to _numSampled
Microsoft.ML.Core (9)
Utilities\ReservoirSampler.cs (9)
145
public int Size { get { return
_numSampled
<= _cache.Length ? (int)
_numSampled
: _cache.Length; } }
147
public long NumSampled { get { return
_numSampled
; } }
169
if (
_numSampled
<= _cache.Length)
171
_getter(ref _cache[
_numSampled
- 1]);
174
if (
_numSampled
== _cache.Length)
186
int k = Stats.SampleFromBinomial(_rnd, _cache.Length, 1.0 /
_numSampled
);
230
if (!_locked &&
_numSampled
< _reservoir.Length)
235
_reservoir[i] = _rnd.Next((int)
_numSampled
);