Returns a directed representation of the graph. Returns: :class:`Graph`: A directed graph with the same name, same nodes, and with each edge (u, v, data) replaced by two directed edges (u, v, data) and (v, u, data).
(self)
| 1132 | ) |
| 1133 | |
| 1134 | def to_directed(self): |
| 1135 | """Returns a directed representation of the graph. |
| 1136 | |
| 1137 | Returns: |
| 1138 | :class:`Graph`: A directed graph with the same name, same nodes, and |
| 1139 | with each edge (u, v, data) replaced by two directed edges (u, v, data) and (v, u, data). |
| 1140 | |
| 1141 | """ |
| 1142 | if self._directed: |
| 1143 | return self |
| 1144 | return self._session._wrapper(self._graph_node.to_directed()) |
| 1145 | |
| 1146 | def to_undirected(self): |
| 1147 | """Returns an undirected representation of the digraph. |