dgl.propagate.prop_nodes_bfs

dgl.propagate.prop_nodes_bfs(graph, source, reversed=False, message_func='default', reduce_func='default', apply_node_func='default')[source]

Message propagation using node frontiers generated by BFS.

Parameters:
  • graph (DGLGraph) – The graph object.
  • source (list, tensor of nodes) – Source nodes.
  • reversed (bool, optional) – If true, traverse following the in-edge direction.
  • message_func (callable, optional) – The message function.
  • reduce_func (callable, optional) – The reduce function.
  • apply_node_func (callable, optional) – The update function.