Read and respond to this message at:
Just to clarify, your example is using jung-1.x and the previous discussion
is using jung-2.0. One big difference is that in jung-2.0 there is no Vertex
or Edge type. The graphs are parameterized like this Graph<V,E> so that you
use any types you like for vertices and edges.
I don't remember well, but I think that jung-1 used some kind of 1-up index
for vertices and that is what was used for the keys when you serialize the vertices
and locations from the layout. I'll bet that when you clear the old graph and
read in new vertices, the numbering starts at 1 plus the number of vertices
in the first graph:
first set of indices: 1,2,3,4,5,6
second set: 7,8,9,10,11,12
If that's the case, then the serialized map from PersistentLayout can never
associate a location with the correct vertex. It might be better to make a brand
new graph when you read in the saved layout. That way, the numbering should
start with 1 again (or zero?).
I'm not too familiar with the PajekNetReader/Writer, but you might find that
making a new graph fixes the other problem, too.
Hope this helps,
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: