如果V1或V2中的任一个不是图G的顶点,则返回{error,{bad_vertex,V}},V=V1或V=V2.add_vertex(G)->vertex()add_vertex(G,V)->vertex
digraph.new()iex>coords=[{0.0,0.0},{1.0,0.0},{1.0,1.0}]iex>[v0,v1,v2]=(forc<-coords,do::digraph.add_vertex