Skip to content

Commit

Permalink
Fixed SCC report
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Mar 20, 2019
1 parent 705b72a commit 92e1777
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/macrogen/report.py
Expand Up @@ -20,7 +20,7 @@

from .config import config
from .bibliography import BiblSource
from .graph import MacrogenesisInfo, EARLIEST, LATEST, DAY
from .graph import MacrogenesisInfo, EARLIEST, LATEST, DAY, Node, MultiEdge
from .graphutils import pathlink, collapse_timeline, expand_edges, in_path
from .uris import Reference, Witness, Inscription, UnknownRef, AmbiguousRef
from .visualize import write_dot, simplify_graph
Expand Down Expand Up @@ -249,7 +249,9 @@ def report_components(graphs: MacrogenesisInfo):
jedem anderen erreichbar ist. Hier ist keine Ordnung möglich, ohne dass Kanten entfernt
werden.</p>
"""
scc_table = _report_subgraphs(graphs.conflicts, target, 'scc-{0:02d}')
sccs = [component for component in nx.strongly_connected_components(graphs.base) if len(component) > 1]
scc_subgraphs = [nx.subgraph(graphs.base, scc) for scc in sccs]
scc_table = _report_subgraphs(scc_subgraphs, target, 'scc-{0:02d}')
report += scc_table.format_table()

wccs = [nx.subgraph(graphs.working, component) for component in nx.weakly_connected_components(graphs.working)]
Expand Down

0 comments on commit 92e1777

Please sign in to comment.