Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VertexAdd seems to forget EdgeWeight values

4 views
Skip to first unread message

Julian Francis

unread,
Jun 5, 2011, 7:05:14 AM6/5/11
to
Dear all,

It seems that when you add a vertex to a graph with EdgeWeight's, that
the old edge weights are not carried over to the new graph. Is this a
bug?

In[561]:=
graph1 = Graph[{1, 2}, {1 \[DirectedEdge] 2}, EdgeWeight -> {5}];

In[557]:= PropertyValue[{graph1, 1 \[DirectedEdge] 2}, EdgeWeight]

Out[557]= 5

In[562]:= graph2 = VertexAdd[graph1, 6];

In[560]:= PropertyValue[{graph2, 1 \[DirectedEdge] 2}, EdgeWeight]

Out[560]= $Failed

Thanks,
Julian.

0 new messages