MCPcopy
hub / github.com/dmlc/dgl / HeteroEdgeView

Class HeteroEdgeView

python/dgl/distributed/dist_graph.py:353–365  ·  view source on GitHub ↗

An EdgeView class to act as G.edges for a DistGraph.

Source from the content-addressed store, hash-verified

351
352
353class HeteroEdgeView(object):
354 """An EdgeView class to act as G.edges for a DistGraph."""
355
356 __slots__ = ["_graph"]
357
358 def __init__(self, graph):
359 self._graph = graph
360
361 def __getitem__(self, key):
362 assert isinstance(key, str) or (
363 isinstance(key, tuple) and len(key) == 3
364 ), f"Expect edge type in string or triplet of string, but got {key}."
365 return EdgeSpace(data=EdgeDataView(self._graph, key))
366
367
368class NodeDataView(MutableMapping):

Callers 1

edgesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected