dgl.contrib.graph_store.SharedMemoryDGLGraph.group_apply_edges¶
-
SharedMemoryDGLGraph.
group_apply_edges
(group_by, func, edges='__ALL__', inplace=True)[source]¶ - Group the edges by nodes and apply the function on the grouped edges to
update their features.
In the graph store, all updates are written inplace.
- Parameters
group_by (str) – Specify how to group edges. Expected to be either ‘src’ or ‘dst’
func (callable) – Apply function on the edge. The function should be an
Edge UDF
. The input of Edge UDF should be (bucket_size, degrees, *feature_shape), and return the dict with values of the same shapes.edges (valid edges type, optional) – Edges on which to group and apply
func
. Seesend()
for valid edges type. Default is all the edges.inplace (bool, optional) – The value is always True.