I create a Graph
which vertices are lists (points in n-dimensional space)
v1 = {{1, 2} -> {3, 4}, {5, 6} -> {7, 8}};
g1 = Graph[v1];
PropertyValue[{g1, VertexList[g1][[1]]}, VertexWeight] = 10
and I get a message error:
Set::write: Tag PropertyValue in PropertyValue[...] is protected
Now, if I do
v2 = {1 -> 2, 3 -> 4};
g2 = Graph[v2];
PropertyValue[{g2, VertexList[g2][[1]]}, VertexWeight] = 10
everything is fine.
g1
and g2
are structurally indentical, the difference is only in vertices type: list(g1
) and scalar(g2
).
What's the problem here?
List
, e.g.Graph[{f[1,2]->f[3,4], ...}]
. $\endgroup$