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

Method _find_indices

python/dgl/sampling/utils.py:55–63  ·  view source on GitHub ↗

Find the set of edge indices to remove.

(self, parent_eids)

Source from the content-addressed store, hash-verified

53 self._filter = recursive_apply(exclude_eids, utils.Filter)
54
55 def _find_indices(self, parent_eids):
56 """Find the set of edge indices to remove."""
57 if self._exclude_eids is not None:
58 parent_eids_np = recursive_apply(parent_eids, F.zerocopy_to_numpy)
59 return _locate_eids_to_exclude(parent_eids_np, self._exclude_eids)
60 else:
61 assert self._filter is not None
62 func = lambda x, y: x.find_included_indices(y)
63 return recursive_apply_pair(self._filter, parent_eids, func)
64
65 def __call__(self, frontier, weights=None):
66 parent_eids = frontier.edata[EID]

Callers 1

__call__Method · 0.95

Calls 4

_locate_eids_to_excludeFunction · 0.85
recursive_apply_pairFunction · 0.85
find_included_indicesMethod · 0.80
recursive_applyFunction · 0.50

Tested by

no test coverage detected