class_docstr:  A graph edge.
  
  **Attributes**
    - data (object): an optional payload
    - w (int): an optional weight associated with the edge (default 1) used by Dijkstra to find min-flow paths.
    - feedback (bool):  whether the Tarjan algorithm has inverted this edge to de-cycle the graph.
class_docstr_tok: ["A","graph","edge",".","*","*","Attributes","*","*","-","data","(","object",")",":","an","optional","payload","-","w","(","int",")",":","an","optional","weight","associated","with","the","edge","(","default","1",")","used","by","Dijkstra","to","find","min-flow","paths",".","-","feedback","(","bool",")",":","whether","the","Tarjan","algorithm","has","inverted","this","edge","to","de-cycle","the","graph","."]
docstr: Creates a new edge.
  :param x: source vertex
  :param y: target vertex
  :param w: optional weight
  :param data: optional data
  :param connect: whether the edge should be added to the component.
docstr_tok: ["Creates","a","new","edge",".",":","param","x",":","source","vertex",":","param","y",":","target","vertex",":","param","w",":","optional","weight",":","param","data",":","optional","data",":","param","connect",":","whether","the","edge","should","be","added","to","the","component","."]
code: def __init__(self, x, y, w=1, data=None, connect=False):
      """
      Creates a new edge.
      :param x: source vertex
      :param y: target vertex
      :param w: optional weight
      :param data: optional data
      :param connect: whether the edge should be added to the component.
      """
      super().__init__(x, y)
      self.w = w
      self.data = data
      self.feedback = False
      if connect and (x.component is None or y.component is None):
          c = x.component or y.component
          c.add_edge(self)
  
file_path: pygraphistry/graphistry/layout/graph/edge.py
imports: from .edgeBase import EdgeBase
label_desc: Use image node_id 1 to create a new Edge object from inherited base classes: EdgeBase with example: obj = Edge(x, y, w, data, connect)