

def has_edge(self, u, v):
    "Return True if the edge (u,v) is in the graph.\n\n        Parameters\n        ----------\n        u,v : nodes\n            Nodes can be, for example, strings or numbers.\n            Nodes must be hashable (and not None) Python objects.\n\n        Returns\n        -------\n        edge_ind : bool\n            True if edge is in the graph, False otherwise.\n\n        Examples\n        --------\n        Can be called either using two nodes u,v or edge tuple (u,v)\n\n        >>> G = nx.Graph()   # or DiGraph, MultiGraph, MultiDiGraph, etc\n        >>> G.add_path([0,1,2,3])\n        >>> G.has_edge(0,1)  # using two nodes\n        True\n        >>> e = (0,1)\n        >>> G.has_edge(*e)  #  e is a 2-tuple (u,v)\n        True\n        >>> e = (0,1,{'weight':7})\n        >>> G.has_edge(*e[:2])  # e is a 3-tuple (u,v,data_dictionary)\n        True\n\n        The following syntax are all equivalent:\n\n        >>> G.has_edge(0,1)\n        True\n        >>> 1 in G[0]  # though this gives KeyError if 0 not in G\n        True\n\n        "
    try:
        return (v in u.adj[u])
    except KeyError:
        return False

dataset/ETHPy150Open networkx/networkx/networkx/classes/tests/timingclasses.py TimingGraph.has_edge/VarMisuse@24/459 `self`->`u`