dgl.NodeFlow.map_to_parent_nid

NodeFlow.map_to_parent_nid(nid)[source]

This maps the child node Ids to the parent Ids.

Parameters:nid (tensor) – The node ID array in the NodeFlow graph.
Returns:The parent node id array.
Return type:Tensor