I noticed that sage presently has two implementations of DLX:

 - a toy one implemented in python: 
https://github.com/sagemath/sage/blob/9cd86e9596a6d996611cd7cc9281ac5a95fda89c/src/sage/combinat/dlx.py

- a wrapper of a C++ implementation:
https://github.com/sagemath/sage/blob/9cd86e9596a6d996611cd7cc9281ac5a95fda89c/src/sage/combinat/matrices/dancing_links.pyx

The toy one actually shows up more prominently in the documentation:
https://doc.sagemath.org/html/en/reference/combinat/sage/combinat/dlx.html
whereas the wrapper is only documented as "internal":
https://doc.sagemath.org/html/en/reference/combinat/sage/combinat/matrices/dancing_links.html

As far as I can see, the two are almost drop-in replacements. The C++ 
implementation does seem to be the one in wider use in the rest of the 
library. Perhaps convert the documentation for "dlx" to use the (almost 
certainly) much more efficient C++ wrapper, and perhaps remove the toy 
implementation?

I happened to need a dlx solver and after searching found the python 
implementation in sage. Unaware of the C++ alternative I nearly went with 
using the python one, which would probably have performed badly.

Changing this over could be a nice introductory project for someone 
interested in familiarizing themselves with sage development.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/96460431-a69a-4585-9672-27d8f81fb3den%40googlegroups.com.

Reply via email to