> It sounds like you are just wanting an order on the edges. If you can > easily compute the index of an edge, you're set (that's the coordinate of > the edge). However, if your problem does not lend itself to that, it sounds > like the easiest thing to do is to maintain dicts to map between an edge and > its coordinate. > > Of course, you can label the edge with it's coordinate vector, right? > There's your map going to the vector space. Coming from the vector space > probably requires the dict.
Hmmm... To be honest, if it was in my own code, or inside of a method, I wouldn't mind at all... In this case, I am using the new method cycle_basis from NetworkX to write a cycle_space method (if I find a good way to do it), and I would like to return a "Nice" object... Something like a vector space + a basis, and such that the elements of the vector space can be easily translated to a set of edges, in both directions. If I have to return dictionaries like this, perhaps it is better to just forget about this cycle_space method, as it would mean the user has to deal with all the nasty aspects of translation by himself... :-/ Nathann -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org