Exemple #1
0
 def addNode(self, id, type=None, coord=None, incLanes=None, intLanes=None):
     if id not in self._id2node:
         node = Vertex(id, coord, incLanes)
         self._nodes.append(node)
         self._id2node[id] = node
     self.setAdditionalNodeInfo(self._id2node[id], type, coord, incLanes)
     return self._id2node[id]
Exemple #2
0
 def newVertex(self):
     v = Vertex(len(self._vertices))
     self._vertices.append(v)
     return v
Exemple #3
0
def vertex_copy(v_id, data):
    return Vertex(vertex_id=v_id, properties=copy.copy(data))