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

refactor: tweak ContinuedFraction.convergent method to pass in the full sequence of elements #36

Closed
sr-murthy opened this issue Mar 16, 2024 · 0 comments · Fixed by #49
Labels
good first issue Good for newcomers refactor Refactoring changes

Comments

@sr-murthy
Copy link
Owner

ATM the continuedfraction.ContinuedFraction.convergent method calls the lib.convergent method with the k-th segment (CF with the first k + 1 elements of the original).

As the k-th convergent is uniquely determined by the k-th segment this works fine, but by design lib.convergent should be given the full sequence of elements of the original.

@sr-murthy sr-murthy added refactor Refactoring changes good first issue Good for newcomers labels Mar 16, 2024
sr-murthy added a commit that referenced this issue Mar 17, 2024
…lib.convergent` will the full sequence of elements
sr-murthy added a commit that referenced this issue Mar 17, 2024
…o pass the full sequence of elements to `lib.convergent` + add cached properties to get all convergents and all remainders
sr-murthy added a commit that referenced this issue Mar 17, 2024
* chore: bump version refs to `0.11.18`

* fix: fixes issue #36: `ContinuedFraction.convergent` method to call `lib.convergent` will the full sequence of elements

* fix: add some missing type hinting in `ContinuedFraction` methods

* refactor: tweak `ContinuedFraction` class to add slots and mypy Final typing for elements instance attribute

* refactor: `functools` caching for some `ContinuedFraction` methods and properties

* feat: closes issues #35, #36: `ContinuedFraction.convergent` method to pass the full sequence of elements to `lib.convergent` + add cached properties to get all convergents and all remainders

* docs: tweak contributions page to add note to built Sphinx docs locally

* refactor: more intuitive variable naming in `lib.fraction_from_elements`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Refactoring changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant