Commit dcd88f5a authored by rusty1s's avatar rusty1s
Browse files

min cluster

parent 4d72a05e
...@@ -36,7 +36,8 @@ at::Tensor graclus(at::Tensor row, at::Tensor col, int64_t num_nodes) { ...@@ -36,7 +36,8 @@ at::Tensor graclus(at::Tensor row, at::Tensor col, int64_t num_nodes) {
for (d_idx = 0; d_idx < deg_data[r]; d_idx++) { for (d_idx = 0; d_idx < deg_data[r]; d_idx++) {
c = col_data[e_idx + d_idx]; c = col_data[e_idx + d_idx];
if (cluster_data[c] < 0) { if (cluster_data[c] < 0) {
cluster_data[c] = r; cluster_data[r] = std::min(r, c);
cluster_data[c] = std::min(r, c);
break; break;
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment