@@ -435,8 +435,6 @@ function TreeSet(
435435 pos_vertices2[k] = pos_vertices2[k - 1 ] + 2 * num_edges_per_tree[k - 1 ]
436436 end
437437
438- verbose = false
439-
440438 rvS = rowvals (S)
441439 for j in axes (S, 2 )
442440 # Use this vector to determine if j appears in the trees
@@ -449,27 +447,21 @@ function TreeSet(
449447 root = forest. parents[index_ij]
450448 index_tree = root_to_tree[root]
451449 t = index_tree
452- verbose && println (" t: $t " )
453450 if ! found_in_tree[index_tree]
454451 # j appears for the first time in the current tree
455452 found_in_tree[index_tree] = true
456453 pos_vertices1[index_tree] += 1
457454 # add j in the list of vertices of the current tree
458455 p = pos_vertices1[index_tree]
459- verbose && println (" pos_vertices1[$t ]: $p " )
460- verbose && println (" vertices1[$p ]: $j " )
461456 vertices1[p] = j
462457 end
463458 # increase the number of neighbors for j in the current tree
464459 p = pos_vertices1[index_tree]
465460 colptr_tree[p] += 1
466- verbose && println (" colptr_tree[$p ]: $(colptr_tree[p]) " )
467461 # increase the position of the visited neighbors in the current tree
468462 pos_vertices2[index_tree] += 1
469463 q = pos_vertices2[index_tree]
470464 vertices2[q] = i
471- verbose && println (" pos_vertices2[$t ]: $q " )
472- verbose && println (" vertices2[$q ]: $i " )
473465 end
474466 end
475467 end
@@ -505,12 +497,7 @@ function TreeSet(
505497 first = 1
506498 # reverse_bfs_orders contains the reverse breadth first (BFS) traversal order for each tree in the forest
507499 for k in 1 : nt
508- verbose && println (" Arbre: $k " )
509- verbose && println (" First index: $first " )
510500 last = first + num_edges_per_tree[k]
511- verbose && println (" Last index: $last " )
512- verbose && println (" ne: $(num_edges_per_tree[k]) " )
513- verbose && println (" nv: $(num_edges_per_tree[k] + 1 ) " )
514501
515502 # Boolean indicating whether the current tree is a star (a single central vertex connected to all others)
516503 bool_star = true
@@ -527,8 +514,6 @@ function TreeSet(
527514 vertex = vertices1[pos1]
528515 degree = colptr_tree[pos1 + 1 ] - colptr_tree[pos1]
529516 degrees[vertex] = degree
530- verbose && println (" vertices1[$pos1 ] = $vertex " )
531- verbose && println (" mapping[$vertex ] = $pos1 " )
532517
533518 # store a reverse mapping
534519 mapping[vertex] = pos1
@@ -549,11 +534,8 @@ function TreeSet(
549534 degrees[leaf] = 0
550535
551536 mleaf = mapping[leaf]
552- verbose && println (" mleaf = $mleaf " )
553537 for pos2 in colptr_tree[mleaf]: (colptr_tree[mleaf + 1 ] - 1 )
554- verbose && println (" pos2 = $pos2 " )
555538 neighbor = vertices2[pos2]
556- verbose && println (" vertices2[$pos2 ] = $neighbor " )
557539
558540 # Check if neighbor is the parent of the leaf or if it was a child before the tree was pruned
559541 if degrees[neighbor] != 0
0 commit comments