diff --git a/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp b/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp index df51be63f..d96fe833a 100644 --- a/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp +++ b/pyg_lib/csrc/sampler/cpu/neighbor_kernel.cpp @@ -226,8 +226,8 @@ class NeighborSampler { at::Tensor index; if (replace) { index = at::multinomial(weight, count, replace); - } - else { // An Efficient Algorithm for Biased Sampling: https://utopia.duth.gr/~pefraimi/research/data/2007EncOfAlg.pdf + } else { // An Efficient Algorithm for Biased Sampling: + // https://utopia.duth.gr/~pefraimi/research/data/2007EncOfAlg.pdf const auto rand = at::empty_like(weight).uniform_(); const auto key = (rand.log() / weight); index = std::get<1>(key.topk(count));