Lines Matching refs:graph
89 def transitive_closure_of_includes(graph, h1): argument
91 def explore(graph, h1): argument
94 for h2 in graph[h1].includes:
95 explore(graph, h2)
96 explore(graph, h1)
100 def transitively_includes(graph, h1, h2): argument
101 return (h1 != h2) and (h2 in transitive_closure_of_includes(graph, h1))
106 graph = {}
111 if fname not in graph:
112 graph[fname] = build_file_entry(fname, options)
113 graph[fname].is_graph_root = (fname in original_roots)
114 roots += graph[fname].includes
115 for fname, entry in graph.items():
116 …entry.cumulative_linecount = sum(graph[h].individual_linecount for h in transitive_closure_of_incl…
117 return graph
127 def get_graphviz(graph, options): argument
147 for fname, entry in graph.items():
150 …if any(transitively_includes(graph, i, h) for i in entry.includes) and not options.show_transitive…
192 graph = build_graph(roots, options) variable
202 for fname in list(graph.keys()):
204 graph[fname].includes = [h for h in graph[fname].includes if should_keep(h)]
206 del graph[fname]
210 for fname, entry in graph.items():
217 elif transitively_includes(graph, h, fname):
224 print(get_graphviz(graph, options))