MCPcopy Create free account
hub / github.com/alibaba/GraphScope / to_directed

Method to_directed

python/graphscope/framework/graph.py:1134–1144  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.

Callers 2

to_directedMethod · 0.45
test_transformFunction · 0.45

Calls 1

_wrapperMethod · 0.80

Tested by 1

test_transformFunction · 0.36