Fix segfault in SubgraphBuilder
parent
4949d6988c
commit
b61636e2f7
|
@ -127,7 +127,8 @@ static vector<size_t> UniqueSampler(const vector<double> &weight,
|
||||||
|
|
||||||
/* sampling and cache results */
|
/* sampling and cache results */
|
||||||
vector<size_t> samples = iidSampler(localWeights, n - count);
|
vector<size_t> samples = iidSampler(localWeights, n - count);
|
||||||
for (const size_t &index : samples) {
|
const auto samplesSize = samples.size();
|
||||||
|
for (size_t index = 0; index < samplesSize; index++) {
|
||||||
if (touched[index] == false) {
|
if (touched[index] == false) {
|
||||||
touched[index] = true;
|
touched[index] = true;
|
||||||
samples.push_back(index);
|
samples.push_back(index);
|
||||||
|
|
Loading…
Reference in New Issue