class_docstr: Really simple unweighted directed graph data structure to track dependencies.
  
  The API is pretty much the same as networkx so if you add something just
  copy their API.
class_docstr_tok: ["Really","simple","unweighted","directed","graph","data","structure","to","track","dependencies",".","The","API","is","pretty","much","the","same","as","networkx","so","if","you","add","something","just","copy","their","API","."]
docstr: Add an edge to graph between nodes ``u`` and ``v``
  
  ``u`` and ``v`` will be created if they do not already exist.
docstr_tok: ["Add","an","edge","to","graph","between","nodes","``","u","``","and","``","v","``","``","u","``","and","``","v","``","will","be","created","if","they","do","not","already","exist","."]
code: def add_edge(self, u, v):
      """Add an edge to graph between nodes ``u`` and ``v``
  
      ``u`` and ``v`` will be created if they do not already exist.
      """
      # add nodes
      self.add_node(u)
      self.add_node(v)
  
      # add the edge
      self._succ[u][v] = True
      self._pred[v][u] = True
  
file_path: pytorch/torch/package/_digraph.py
imports: from collections import deque
  from typing import List, Set
label_desc: Use image node_id 3 for calling the DiGraph obj's underlying member method code with example usage: obj.add_edge(u, v) without return types