> I'm sure it's not fast, but in the file > devel/sage/sage/homology/examples.py, there is a function "matching" which > gets used in "simplicial_complexes.ChessboardComplex(...)".
Well, obviously there is a "matching" function in the Graph class. But nothing to enumerate them. Oh. Now that I think of it, actually there is. I wrote a patch to enumerate all independent sets of a graph, just there : http://trac.sagemath.org/sage_trac/ticket/13917 If you have it applied, then running : g = graphs.PetersenGraph() g = g.line_graph(labels = False) from sage.graphs.independent_sets import IndependentSets for m in IndependentSets(g): print "Here is a matching",m So actually, this enumerates all possible matchings :-P Well, it works but it would be nice to have something for matching especially. This function can be slow sometimes. You can also filter the (inclusionwise) maximal matchings if you want. Well, I think it answers the question. But the trick I gave above is cleaner :-P Nathann -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
