You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
This comes from a confusion on using a MetaGraph as a dictionary. The syntax mg[i] retrieves the vertex associated to a given label (which can have arbitrary type), not to a given code, or index (which is always an integer). That is why the documentation recommends not using integers as labels as well, because it is very easy to mix up both concepts.
In the subgraph you create, the vertex labels remain [2, 3] but the vertex codes are renumbered to 1:2. More generally, labels are preserved through graph modifications, but codes are not.
To fix your program, here are two options:
Thanks for the fast reply! It is more clear now. Perhaps I should create me a new package MetaGraphsButOnlyWithLabelThatAreSimpleIntegers.jl ... Have a good day
Hello,
I've an issue regarding the function induced_subgraph with metagraphs: in the metadata, the index of the new nodes is not changed correctly.
See the following example:
Will print a
KeyError: key 1 not found
Perhaps I'm not using this correctly ? Otherwise, I've been looking in the source code, the
_copy_props!
is not working correctly ?Muchas gracias,
The text was updated successfully, but these errors were encountered: