MCPcopy Create free account
hub / github.com/Kitware/VTK / GenerateGraph

Function GenerateGraph

Utilities/Maintenance/VisualizeModuleDependencies.py:195–209  ·  view source on GitHub ↗

Generate a graph from the module list. The resultant graph is a list consisting of two sets, the first set is the set of vertices and the second set is the edge list.

(moduleList, moduleDepencencies, moduleTreeDepth)

Source from the content-addressed store, hash-verified

193 return [GetAllKeys(t), MakeEdgeList(t)]
194
195def GenerateGraph(moduleList, moduleDepencencies, moduleTreeDepth):
196 '''
197 Generate a graph from the module list.
198 The resultant graph is a list consisting of two sets, the first set
199 is the set of vertices and the second set is the edge list.
200 '''
201 graph = [set(), set()]
202 for m in moduleList:
203 t = Tree()
204 MakeModuleTree(m, [], t, moduleDepencencies, moduleTreeDepth)
205 g = MakeGraph(t)
206 graph[0].update(g[0])
207 if g[1]:
208 graph[1].update(g[1])
209 return graph
210
211def GenerateVTKGraph(graph):
212 '''

Callers 1

mainFunction · 0.85

Calls 5

TreeFunction · 0.85
MakeModuleTreeFunction · 0.85
MakeGraphFunction · 0.85
setFunction · 0.50
updateMethod · 0.45

Tested by

no test coverage detected