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]]++; 193if (_counts[_reservoir[ind]] > 1) 195Contracts.Assert(_counts.Contains(0)); 196var 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; 201else if (_counts[_reservoir[ind]] == 0) 202_counts[_reservoir[ind]]++; 210_counts[_reservoir[next]]--; 212_counts[_reservoir[next]]++; 236_counts[_reservoir[i]]++;