Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Dec 20, 2024
1 parent 4a6d742 commit 1b07303
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paraffin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def dag_to_levels(
for node in nx.bfs_tree(graph, start_node):
if node not in nodes:
nodes.append(node)
# iterate all paths from start_node to node
# find the longest path from the start_node to the current node
# to determine the level of the current node
level = 0
for path in nx.all_simple_paths(graph, start_node, node):
level = max(level, len(path) - 1)
Expand Down

0 comments on commit 1b07303

Please sign in to comment.