I got it to work by doing "len(names_to_idxs._ids)". Not sure if that is the correct way to do it though.
A good addtion to this code would be to allow it to be flipped around, so you could call all those items by using the id. Then you could loop back through it and add each as a vertices name attribute. :-)
On Mon, Apr 13, 2009 at 7:26 PM, Jeff G
<address@hidden> wrote:
Ahh, It said at the top that it was part of the igraph library, so I thought it was already in there. Opps..
After adding it to my code, it worked except for the "len(names_to_idxs)". It states that "TypeError: object of type 'UniqueIdGenerator' has no len()"
The rest seems to work great. If this has not been included in igraph, it would be a nice addition.
- Jeff
On Mon, Apr 13, 2009 at 5:50 PM, Tamas Nepusz
<address@hidden> wrote:
Thanks Tamas! That tutorial is great.
I tried your code but it says that UniqueIdGenerator() is not defined.
Have you added the code snippet at the following URL to your program?
This is the definition of the UniqueIdGenerator class.