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)
| 193 | return [GetAllKeys(t), MakeEdgeList(t)] |
| 194 | |
| 195 | def 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 | |
| 211 | def GenerateVTKGraph(graph): |
| 212 | ''' |