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

Method node_subgraphs

python/dgl/graph_index.py:603–619  ·  view source on GitHub ↗

Return the induced node subgraphs. Parameters ---------- vs_arr : a list of utils.Index The nodes. Returns ------- a vector of SubgraphIndex The subgraph index.

(self, vs_arr)

Source from the content-addressed store, hash-verified

601 return subg, inner_nodes
602
603 def node_subgraphs(self, vs_arr):
604 """Return the induced node subgraphs.
605
606 Parameters
607 ----------
608 vs_arr : a list of utils.Index
609 The nodes.
610
611 Returns
612 -------
613 a vector of SubgraphIndex
614 The subgraph index.
615 """
616 gis = []
617 for v in vs_arr:
618 gis.append(self.node_subgraph(v))
619 return gis
620
621 def edge_subgraph(self, e, preserve_nodes=False):
622 """Return the induced edge subgraph.

Callers

nothing calls this directly

Calls 2

node_subgraphMethod · 0.95
appendMethod · 0.80

Tested by

no test coverage detected