Opened 7 years ago

Closed 7 years ago

#15403 closed enhancement (fixed)

knapsack's docstring doesn't document an useful feature

Reported by: defeo Owned by:
Priority: minor Milestone: sage-6.1
Component: documentation Keywords:
Cc: Merged in:
Authors: Luca De Feo Reviewers: Nathann Cohen
Report Upstream: N/A Work issues:
Branch: u/defeo/ticket/15403 (Commits) Commit: 45358753f859d34b33b3e386e18228d4b6d17879
Dependencies: Stopgaps:


knapsack can be passed a list of arbitrary tuples (not just pairs), as in

sage: knapsack( [(1,2,'spam'), (1.5,1,'a'), (0.5,3,'lot')], max=2)
[5.0, [(1, 2, 'spam'), (0.500000000000000, 3, 'lot')]]

This is useful if one wants to attach data to a knapsack problem, however it is undocumented in the docstring. This ticket adds the relevant documentation.

Change History (9)

comment:1 Changed 7 years ago by defeo

  • Branch set to u/defeo/ticket/15403
  • Created changed from 11/12/13 16:30:37 to 11/12/13 16:30:37
  • Modified changed from 11/12/13 16:30:37 to 11/12/13 16:30:37

comment:2 Changed 7 years ago by defeo

  • Commit set to 23623ce4fba4d13facb4c534eae9903634f5f72a
  • Status changed from new to needs_review

New commits:

23623ceImproved knapsack's docstring

comment:3 Changed 7 years ago by ncohen

  • Reviewers set to Nathann Cohen

Hellooooooo !!

I rephrased the first of the two explanations, what do you think ? It is in branch u/ncohen/15403. If you agree with it, you can merge it into yours and set the ticket to positive review. Aaaaaaaaaaaaaannddd I will probably create another ticket to clean up a bit the documentation of this knapsack module, as a couple of bad things happen in there (like a copy/pasted definition, links that can be rewritten, etc) ;-)

Thaaaaanks !


comment:4 Changed 7 years ago by git

  • Commit changed from 23623ce4fba4d13facb4c534eae9903634f5f72a to 45358753f859d34b33b3e386e18228d4b6d17879

Branch pushed to git repo; I updated commit sha1. New commits:

4535875Improved knapsack's docstring -- review

comment:5 Changed 7 years ago by defeo

  • Status changed from needs_review to positive_review

Merged, thanks. Feel free to cc me on the doc cleanup ticket.

comment:6 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.13 to sage-6.0

Please fill in the Author field with your real name.

comment:7 Changed 7 years ago by defeo

  • Authors set to Luca De Feo

comment:8 Changed 7 years ago by vbraun_spam

  • Milestone changed from sage-6.0 to sage-6.1

comment:9 Changed 7 years ago by vbraun

  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.