

def add_edge(self, u, v, **kwargs):
    "\n        Add an edge between two clique nodes.\n\n        Parameters\n        ----------\n        u, v: nodes\n            Nodes can be any list or set or tuple of nodes forming a clique.\n\n        Examples\n        --------\n        >>> from pgmpy.models import JunctionTree\n        >>> G = JunctionTree()\n        >>> G.add_nodes_from([('a', 'b', 'c'), ('a', 'b'), ('a', 'c')])\n        >>> G.add_edges_from([(('a', 'b', 'c'), ('a', 'b')),\n        ...                   (('a', 'b', 'c'), ('a', 'c'))])\n        "
    if ((u in self.nodes()) and (v in self.nodes()) and nx.has_path(self, u, v)):
        raise ValueError('Addition of edge between {u} and {v} forms a cycle breaking the properties of Junction Tree'.format(u=str(u), v=str(v)))
    super(JunctionTree, v).add_edge(u, v, **kwargs)

dataset/ETHPy150Open pgmpy/pgmpy/pgmpy/models/JunctionTree.py JunctionTree.add_edge/VarMisuse@83/339 `self`->`v`