def addEdge(self, vertex1Id, vertex2Id, value=1.0):
        if len(self.neighbourOf(vertex2Id)) == 1 and self.neighbourOf(vertex2Id) != [vertex1Id]:
            raise ValueError("Vertex cannot have more than one parent")

        if self.getNumVertices()!=0 and not self.vertexExists(vertex1Id) and not self.vertexExists(vertex2Id):
            raise ValueError("Cannot add isolated edge")

        super(DictTree, self).addEdge(vertex1Id, vertex2Id, value)
Add an edge from vertex1 to vertex2 with a given value.
dataset/ETHPy150Open charanpald/APGL/apgl/graph/DictTree.py/DictTree.addEdge