Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2959

VertexAdd seems to forget EdgeWeight values

From Julian Francis <julian.w.francis@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject VertexAdd seems to forget EdgeWeight values
Date 2011-06-05 11:05 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <isfnta$bus$1@smc.vnet.net> (permalink)

Show all headers | View raw


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.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

VertexAdd seems to forget EdgeWeight values Julian Francis <julian.w.francis@gmail.com> - 2011-06-05 11:05 +0000

csiph-web