I have a pygraph data structure, which I want to modify. I want to perform the following operations:
- Create a copy of the existing pygraph
- Modify the nodes in the copy, by walking the tree and changing the node attributes
I am unable to find in the documentation/code how to do these operations. Is it possible? How?
Copying:
To copy a structure in python you need to make use of the copy module
Traversing
There is an example on how to traverse the graph: