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


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

VertexAdd seems to forget EdgeWeight values

Started byJulian Francis <julian.w.francis@gmail.com>
First post2011-06-05 11:05 +0000
Last post2011-06-05 11:05 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

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

#2959 — VertexAdd seems to forget EdgeWeight values

FromJulian Francis <julian.w.francis@gmail.com>
Date2011-06-05 11:05 +0000
SubjectVertexAdd seems to forget EdgeWeight values
Message-ID<isfnta$bus$1@smc.vnet.net>
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.

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web