(self)
| 1188 | return G, index_of_node, node_of_index |
| 1189 | |
| 1190 | def cpp(self): |
| 1191 | G = DiGraphC() |
| 1192 | G.graph.update(self.graph) |
| 1193 | for u, attr in self.nodes.items(): |
| 1194 | G.add_node(u, **attr) |
| 1195 | for u, v, attr in self.edges: |
| 1196 | G.add_edge(u, v, **attr) |
| 1197 | G.generate_linkgraph() |
| 1198 | return G |
| 1199 | |
| 1200 | |
| 1201 | try: |