1 write to _counts
Microsoft.ML.Core (1)
Utilities\ReservoirSampler.cs (1)
157
_counts
= new int[size];
11 references to _counts
Microsoft.ML.Core (11)
Utilities\ReservoirSampler.cs (11)
179
_counts
[_reservoir[i]]++;
193
if (
_counts
[_reservoir[ind]] > 1)
195
Contracts.Assert(
_counts
.Contains(0));
196
var tmp =
_counts
.Select((count, i) => new KeyValuePair<int, int>(count, i)).First(kvp => kvp.Key == 0);
197
_counts
[_reservoir[ind]]--;
199
_counts
[tmp.Value] = 1;
201
else if (
_counts
[_reservoir[ind]] == 0)
202
_counts
[_reservoir[ind]]++;
210
_counts
[_reservoir[next]]--;
212
_counts
[_reservoir[next]]++;
236
_counts
[_reservoir[i]]++;