Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[massively positive review] Include Antti Ajanki's DLX library #2271

Closed
boothby opened this issue Feb 22, 2008 · 10 comments
Closed

[massively positive review] Include Antti Ajanki's DLX library #2271

boothby opened this issue Feb 22, 2008 · 10 comments

Comments

@boothby
Copy link

boothby commented Feb 22, 2008

The Dancing Links algorithm (DLX) is sweet. It solves the Exact Cover problem with the quickness.

Arguments for including Ajanki's code:

Component: combinatorics

Issue created by migration from https://trac.sagemath.org/ticket/2271

@boothby
Copy link
Author

boothby commented Feb 22, 2008

Attachment: 2271_adds_DLX.hg.gz

@williamstein
Copy link
Contributor

comment:2

+1 to include this in Sage.

I haven't formally refereed it.

You should just attach a single plain text patch instead of an hg bundle.

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-2.10.3 milestone Feb 23, 2008
@boothby
Copy link
Author

boothby commented Feb 23, 2008

comment:4

Oops, I forgot to add the functions to all.py, so the tests fail. New patch up in a few.

@rlmill
Copy link
Mannequin

rlmill mannequin commented Feb 24, 2008

comment:5

Attachment: 2271_adds_DLX.patch.gz

This patch (although awesome) doesn't quite obey the new doctest-for-every-function rule, since the following functions do not have doctests:

  1. walknodes
  2. constructmatrix
  3. covercolumn
  4. uncovercolumn
  5. dosearch
  6. solve

@rlmill rlmill mannequin changed the title Include Antti Ajanki's DLX library [positive review pending documentation] Include Antti Ajanki's DLX library Feb 24, 2008
@boothby

This comment has been minimized.

@boothby
Copy link
Author

boothby commented Feb 25, 2008

Attachment: 2271_doctests.patch.gz

@boothby
Copy link
Author

boothby commented Feb 25, 2008

comment:7

2271_doctests.patch implements world peace, washes your dishes, and makes coffee before your alarm goes off in the morning. It's truly amazing. Also, it contains doctests for everything in sight, reworks the DLXMatrix class to be a real python generator class, and implements an iterative formulation of DLX.

In the creation of these doctests, I have discovered a wondrous resolution of P vs. NP, but the proof was too long to justify appending to the patch.

@rlmill
Copy link
Mannequin

rlmill mannequin commented Feb 25, 2008

comment:8

As well as a round of applause.

@rlmill rlmill mannequin changed the title [positive review pending documentation] Include Antti Ajanki's DLX library [massively positive review] Include Antti Ajanki's DLX library Feb 25, 2008
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Feb 25, 2008

comment:9

Replying to @boothby:

2271_doctests.patch implements world peace, washes your dishes, and makes coffee before your alarm goes off in the morning. It's truly amazing. Also, it contains doctests for everything in sight, reworks the DLXMatrix class to be a real python generator class, and implements an iterative formulation of DLX.

In the creation of these doctests, I have discovered a wondrous resolution of P vs. NP, but the proof was too long to justify appending to the patch.

I guess you should have written it in the margins :)

Cheers,

Michael

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Feb 25, 2008

comment:10

Merged 2271_adds_DLX.patch and 2271_doctests.patch in Sage 2.10.3.alpha0 - w00t

@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Feb 25, 2008
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants