(self, src, dst)
Add a link from src to dst
Add a link from src to dst
Add a link from src to dst
def add_link(self, src, dst):
        """
        Add a link from src to dst
        """
        if src in self.dsttosrcs:
            raise ValueError("Source already used as destination %s" % dst)
        if dst in self.srctodsts:
            raise ValueError("Destination already used as source %s" % dst)
        if src in self.srctodsts:
            self.srctodsts[src].append(dst)
        else:
            self.srctodsts[src] = [dst]
        if dst in self.dsttosrcs:
            self.dsttosrcs[dst].append(src)
        else:
            self.dsttosrcs[dst] = [src]
def add_link ( self , src , dst ) : if src in self . dsttosrcs : raise ValueError ( "Source already used as destination %s" % dst ) if dst in self . srctodsts : raise ValueError ( "Destination already used as source %s" % dst ) if src in self . srctodsts : self . srctodsts [ src ] . append ( dst ) else : self . srctodsts [ src ] = [ dst ] if dst in self . dsttosrcs : self . dsttosrcs [ dst ] . append ( src ) else : self . dsttosrcs [ dst ] = [ src ]