| Home | Trees | Indices | Help |
|---|
|
|
File: sage/combinat/matrices/dancing_links.pyx (starting at line 1) Dancing Links internal pyx code
|
|||
| dancing_linksWrapper | |||
|
|||
|
|||
|
|||
|
|||
File: sage/combinat/matrices/dancing_links.pyx (starting at line 245)
Internal-use wrapper for the dancing links C++ code.
EXAMPLES:
sage: from sage.combinat.matrices.dancing_links import dlx_solver
sage: rows = [[0,1,2]]
sage: rows+= [[0,2]]
sage: rows+= [[1]]
sage: rows+= [[3]]
sage: x = dlx_solver(rows)
sage: print x.search()
1
sage: print x.get_solution()
[3, 0]
sage: print x.search()
1
sage: print x.get_solution()
[3, 1, 2]
sage: print x.search()
0
|
File: sage/combinat/matrices/dancing_links.pyx (starting at line 276)
Create a dlx wrapper from a Python *string* s.
This is used in unpickling. We expect s to be dumps(rows) where
rows is the list of rows used to instantiate the object.
TESTS:
sage: rows = [[0,1,2]]
sage: x = make_dlxwrapper(dumps(rows))
sage: print x.__str__()
[[0, 1, 2]]
|
| Home | Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0beta1 on Thu Jul 17 04:23:25 2008 | http://epydoc.sourceforge.net |