dgl.NodeFlow.map_from_parent_nid

NodeFlow.map_from_parent_nid(layer_id, parent_nids, remap_local=False)[source]

Map parent node Ids to NodeFlow node Ids in a certain layer.

If remap_local is True, it returns the node Ids local to the layer. Otherwise, the node Ids are unique in the NodeFlow.

Parameters:
  • layer_id (int) – The layer Id.
  • parent_nids (list or Tensor) – Node Ids in the parent graph.
  • remap_local (boolean) – Remap layer/block-level local Id if True; otherwise, NodeFlow-level Id.
Returns:

Node Ids in the NodeFlow.

Return type:

Tensor