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

Method get_relation_graph

python/dgl/heterograph_index.py:97–110  ·  view source on GitHub ↗

Get the unitgraph graph of the given edge/relation type. Parameters ---------- etype : int The edge/relation type. Returns ------- HeteroGraphIndex The unitgraph graph.

(self, etype)

Source from the content-addressed store, hash-verified

95 return self.metagraph.num_edges()
96
97 def get_relation_graph(self, etype):
98 """Get the unitgraph graph of the given edge/relation type.
99
100 Parameters
101 ----------
102 etype : int
103 The edge/relation type.
104
105 Returns
106 -------
107 HeteroGraphIndex
108 The unitgraph graph.
109 """
110 return _CAPI_DGLHeteroGetRelationGraph(self, int(etype))
111
112 def flatten_relations(self, etypes):
113 """Convert the list of requested unitgraph graphs into a single unitgraph

Callers 6

get_unitgraphMethod · 0.95
add_nodesMethod · 0.80
add_edgesMethod · 0.80
__getitem__Method · 0.80
cloneMethod · 0.80
edge_type_subgraphFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected