Hi, Rob, Thanks for you quick reply! I think that many of the functions I have would be easily generalized to undirected graphs. I will think about a precise list of functions I intend to share/improve/code along with what they do. I should come back soon about that. Alex
On 10 juin, 23:32, Rob Beezer <goo...@beezer.cotse.net> wrote: > Alexandre, > > Today I wanted a 6-cycle from a large graph, so such a function would > have been welcome. If it is convenient you might have your routine > return a generator. Then it can be used to test existence of such a > cycle, employed to get once to get a single cycle, or used to iterate > over some, or all, of the cycles without necessarily creating the > entire list first. You can still use the generator to provide a > method that just sends back all of the cycles all at once. > > There is a girth() method, so you might look at that code as well to > see if there is any overlap. it'd be great if your routine was > general enough to work for both directed and undirected graphs. > > Rob > > On Jun 10, 2:35 pm, "alexandre.blondin.ma...@gmail.com" > > <alexandre.blondin.ma...@gmail.com> wrote: > > Hi everybody, > > I am currently working on a project in which I compute cycles in > > directed graph. I am wondering if it would be interesting to add some > > of my code to Sage. For instance, I noticed that there is no function > > computing all cycles of a given length in a graph, or a function > > returning an arbitrary cycle, etc. More precisely, I am interested in > > the feedback vertex set problem : given a graph G, find a smallest set > > of vertices V such that G - V is acyclic. > > If so, I would create a ticket for it. It would be the first time I > > contribute to Sage. Moreover, if any of you has already worked on such > > problems, I would be more than happy to compare the code.. > > Alexandre Blondin Massé > > Laboratoire de combinatoire et d'informatique mathématique > > Université du Québec à Montréal --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---