dgl.prop_nodes_bfs

dgl.prop_nodes_bfs(graph, source, message_func, reduce_func, reverse=False, apply_node_func=None)[source]

Message propagation using node frontiers generated by BFS.

Parameters
  • graph (DGLHeteroGraph) – The graph object.

  • source (list, tensor of nodes) – Source nodes.

  • message_func (callable) – The message function.

  • reduce_func (callable) – The reduce function.

  • reverse (bool, optional) – If true, traverse following the in-edge direction.

  • apply_node_func (callable, optional) – The update function.

See also

dgl.traversal.bfs_nodes_generator()