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

Support other increments of size #39

Open
4 tasks
mwermelinger opened this issue Aug 13, 2024 · 1 comment
Open
4 tasks

Support other increments of size #39

mwermelinger opened this issue Aug 13, 2024 · 1 comment
Labels
effort: medium These issues require some work type: enhancement Improve an existing feature

Comments

@mwermelinger
Copy link
Member

mwermelinger commented Aug 13, 2024

Currently the size is always doubled, but for exponential or factorial algorithms it would be better to increment size by 1. For most flexibility, the functions would allow to increment by a fixed amount and/or by a factor. Arguments could be:

  • start value/size
  • steps number of doublings or additions, must be ≥ 0
  • factor: a float ≥ 1, default 2
  • increment: an int ≥ 0, default 0

The function then measures run-times for start, start*factor+increment, etc. for as many steps as given. (steps = 0 means it does only for start)

  • update library (should check that factor > 1 or increment > 0, as otherwise size doesn't grow)
  • update code guide
  • update/add an example in an essay (maybe a student essay)
  • update template
@mwermelinger mwermelinger added effort: medium These issues require some work type: enhancement Improve an existing feature labels Aug 13, 2024
@densnow
Copy link
Collaborator

densnow commented Aug 17, 2024

I've made a start on this and pushed a 39-support-other-increments branch.

So far I have:

  • modified the library including code, docstrings and assertions
  • modified the example and template essays by changing the double parameter to steps

I won't tick any of the boxes until I have had another look tomorrow and will continue working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: medium These issues require some work type: enhancement Improve an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants