class_docstr: The class that can represent a batch of edges.
  
  Parameters
  ----------
  graph : DGLGraph
      Graph object.
  eid : Tensor
      Edge IDs.
  etype : (str, str, str)
      Edge type.
  src_data : dict[str, Tensor]
      Src node features.
  edge_data : dict[str, Tensor]
      Edge features.
  dst_data : dict[str, Tensor]
      Dst node features.
class_docstr_tok: ["The","class","that","can","represent","a","batch","of","edges",".","Parameters","--","--","--","--","--","graph",":","DGLGraph","Graph","object",".","eid",":","Tensor","Edge","IDs",".","etype",":","(","str",",","str",",","str",")","Edge","type",".","src_data",":","dict","[","str",",","Tensor","]","Src","node","features",".","edge_data",":","dict","[","str",",","Tensor","]","Edge","features",".","dst_data",":","dict","[","str",",","Tensor","]","Dst","node","features","."]
docstr: Return a view of the destination node features for the edges in the batch.
  
  Examples
  --------
  The following example uses PyTorch backend.
  
  >>> import dgl
  >>> import torch
  
  >>> # Instantiate a graph and set a node feature 'h'.
  >>> g = dgl.graph((torch.tensor([0, 1, 1]), torch.tensor([1, 1, 0])))
  >>> g.ndata['h'] = torch.tensor([[0.], [1.]])
  
  >>> # Define a UDF that retrieves the destination node features for
  >>> # edges.
  >>> def edge_udf(edges):
  >>>     # edges.dst['h'] is a tensor of shape (E, 1),
  >>>     # where E is the number of edges in the batch.
  >>>     return {'dst': edges.dst['h']}
  
  >>> # Copy features from destination nodes to edges.
  >>> g.apply_edges(edge_udf)
  >>> g.edata['dst']
  tensor([[1.],
          [1.],
          [1.]])
  
  >>> # Use edge UDF in message passing.
  >>> import dgl.function as fn
  >>> g.update_all(edge_udf, fn.sum('dst', 'h'))
  >>> g.ndata['h']
  tensor([[0.],
          [2.]])
docstr_tok: ["Return","a","view","of","the","destination","node","features","for","the","edges","in","the","batch",".","Examples","--","--","--","--","The","following","example","uses","PyTorch","backend",".",">",">",">","import","dgl",">",">",">","import","torch",">",">",">","#","Instantiate","a","graph","and","set","a","node","feature","'","h","'",".",">",">",">","g","=","dgl.graph","(","(","torch.tensor","(","[","0",",","1",",","1","]",")",",","torch.tensor","(","[","1",",","1",",","0","]",")",")",")",">",">",">","g.ndata","[","'","h","'","]","=","torch.tensor","(","[","[","0",".","]",",","[","1",".","]","]",")",">",">",">","#","Define","a","UDF","that","retrieves","the","destination","node","features","for",">",">",">","#","edges",".",">",">",">","def","edge_udf","(","edges",")",":",">",">",">","#","edges.dst","[","'","h","'","]","is","a","tensor","of","shape","(","E",",","1",")",",",">",">",">","#","where","E","is","the","number","of","edges","in","the","batch",".",">",">",">","return","{","'dst","'",":","edges.dst","[","'","h","'","]","}",">",">",">","#","Copy","features","from","destination","nodes","to","edges",".",">",">",">","g.apply_edges","(","edge_udf",")",">",">",">","g.edata","[","'dst","'","]","tensor","(","[","[","1",".","]",",","[","1",".","]",",","[","1",".","]","]",")",">",">",">","#","Use","edge","UDF","in","message","passing",".",">",">",">","import","dgl.function","as","fn",">",">",">","g.update_all","(","edge_udf",",","fn.sum","(","'dst","'",",","'","h","'",")",")",">",">",">","g.ndata","[","'","h","'","]","tensor","(","[","[","0",".","]",",","[","2",".","]","]",")"]
code: def dst(self):
      """Return a view of the destination node features for the edges in the batch.
  
      Examples
      --------
      The following example uses PyTorch backend.
  
      >>> import dgl
      >>> import torch
  
      >>> # Instantiate a graph and set a node feature 'h'.
      >>> g = dgl.graph((torch.tensor([0, 1, 1]), torch.tensor([1, 1, 0])))
      >>> g.ndata['h'] = torch.tensor([[0.], [1.]])
  
      >>> # Define a UDF that retrieves the destination node features for
      >>> # edges.
      >>> def edge_udf(edges):
      >>>     # edges.dst['h'] is a tensor of shape (E, 1),
      >>>     # where E is the number of edges in the batch.
      >>>     return {'dst': edges.dst['h']}
  
      >>> # Copy features from destination nodes to edges.
      >>> g.apply_edges(edge_udf)
      >>> g.edata['dst']
      tensor([[1.],
              [1.],
              [1.]])
  
      >>> # Use edge UDF in message passing.
      >>> import dgl.function as fn
      >>> g.update_all(edge_udf, fn.sum('dst', 'h'))
      >>> g.ndata['h']
      tensor([[0.],
              [2.]])
      """
      return self._dst_data
  
file_path: dgl/python/dgl/udf.py
imports: from __future__ import absolute_import
label_desc: Use image node_id 3 for calling the EdgeBatch obj's underlying member method code with example usage: obj.dst() and returns: self