@@ -28,10 +28,25 @@ function postprocess!(
2828
2929 if star_or_tree_set isa StarSet
3030 # star_or_tree_set is a StarSet
31- postprocess_with_star_set! (bicoloring, g, row_color_used, column_color_used, color, star_or_tree_set, postprocessing_minimizes)
31+ postprocess_with_star_set! (
32+ bicoloring,
33+ g,
34+ row_color_used,
35+ column_color_used,
36+ color,
37+ star_or_tree_set,
38+ postprocessing_minimizes,
39+ )
3240 else
3341 # star_or_tree_set is a TreeSet
34- postprocess_with_tree_set! (bicoloring, row_color_used, column_color_used, color, star_or_tree_set, postprocessing_minimizes)
42+ postprocess_with_tree_set! (
43+ bicoloring,
44+ row_color_used,
45+ column_color_used,
46+ color,
47+ star_or_tree_set,
48+ postprocessing_minimizes,
49+ )
3550 end
3651
3752 if bicoloring
@@ -175,7 +190,8 @@ function postprocess_with_star_set!(
175190 #
176191 # Note that this heuristic also depends on the order in which
177192 # the trivial stars are processed, especially when there are ties in `color_counts`.
178- if row_color_counts[color[i]] > column_color_counts[color[j]]
193+ if row_color_counts[color[i]] >
194+ column_color_counts[color[j]]
179195 row_color_used[color[i]] = true
180196 hub[s] = i
181197 else
@@ -191,7 +207,9 @@ function postprocess_with_star_set!(
191207 hub[s] = i
192208 row_color_used[color[i]] = true
193209 else
194- error (" The value postprocessing_minimizes = :$postprocessing_minimizes is not supported." )
210+ error (
211+ " The value postprocessing_minimizes = :$postprocessing_minimizes is not supported." ,
212+ )
195213 end
196214 else
197215 # Previously processed trivial stars determined the hub vertex for this star
@@ -244,8 +262,8 @@ function postprocess_with_tree_set!(
244262 else
245263 # It is not a star and both colors are needed during the decompression
246264 (i, j) = reverse_bfs_orders[first]
247- v_col = min (i,j)
248- v_row = max (i,j)
265+ v_col = min (i, j)
266+ v_row = max (i, j)
249267 row_color_used[color[v_row]] = true
250268 column_color_used[color[v_col]] = true
251269 end
@@ -274,8 +292,8 @@ function postprocess_with_tree_set!(
274292 # Check if we have exactly one edge in the tree
275293 if ne_tree == 1
276294 (i, j) = reverse_bfs_orders[first]
277- v_col = min (i,j)
278- v_row = max (i,j)
295+ v_col = min (i, j)
296+ v_row = max (i, j)
279297 if column_color_used[color[v_col]]
280298 # The vertex v_col is already an internal node in a non-trivial tree
281299 reverse_bfs_orders[first] = (v_row, v_col)
@@ -307,7 +325,7 @@ function postprocess_with_tree_set!(
307325 # This is optimal because we never increase the number of colors in the target partition during this phase,
308326 # and all preceding steps of the post-processing are deterministic.
309327 if ! all_trivial_trees_treated
310- for k in 1 : nt
328+ for k in 1 : nt
311329 # Position of the first edge in the tree
312330 first = tree_edge_indices[k]
313331
@@ -317,8 +335,8 @@ function postprocess_with_tree_set!(
317335 # Check if we have exactly one edge in the tree
318336 if ne_tree == 1
319337 (i, j) = reverse_bfs_orders[first]
320- v_col = min (i,j)
321- v_row = max (i,j)
338+ v_col = min (i, j)
339+ v_row = max (i, j)
322340 if ! column_color_used[color[v_col]] && ! row_color_used[color[v_row]]
323341 if ! bicoloring || postprocessing_minimizes == :all_colors
324342 # Choose as root the vertex whose color is most frequent among the trivial trees.
@@ -330,7 +348,8 @@ function postprocess_with_tree_set!(
330348 #
331349 # Note that this heuristic also depends on the order in which
332350 # the trivial trees are processed, especially when there are ties in `color_counts`.
333- if row_color_counts[color[v_row]] > column_color_counts[color[v_col]]
351+ if row_color_counts[color[v_row]] >
352+ column_color_counts[color[v_col]]
334353 row_color_used[color[v_row]] = true
335354 reverse_bfs_orders[first] = (v_col, v_row)
336355 else
@@ -346,7 +365,9 @@ function postprocess_with_tree_set!(
346365 row_color_used[color[v_row]] = true
347366 reverse_bfs_orders[first] = (v_col, v_row)
348367 else
349- error (" The value postprocessing_minimizes = :$postprocessing_minimizes is not supported." )
368+ error (
369+ " The value postprocessing_minimizes = :$postprocessing_minimizes is not supported." ,
370+ )
350371 end
351372 else
352373 # Previously processed trivial trees determined the root vertex for this tree
0 commit comments