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

Miscellaneous changes #121

Merged
merged 7 commits into from
Aug 3, 2024
Merged

Miscellaneous changes #121

merged 7 commits into from
Aug 3, 2024

Conversation

rneswold
Copy link
Contributor

@rneswold rneswold commented Aug 3, 2024

These are a few little changes I made when going through the recent code that I added.

  • Apply clippy recommendations
  • More validation checks for the map driver
  • Added more unit tests for the map driver
  • Improved the map algorithm in the map driver

This converts an imperative algorithm into a functional one.
The function that gets the values array from the configuration now:

- Sorts the entries by range. The ranges are sorted in ascending
  "start" values.
- Now that the array is sorted, this function goes through and checks
  to see if any ranges overlap.
The previous version iterated through the array until it found the
entry that contained the index. Now that the values array is sorted,
we can switch to the binary search function.
These tests make sure reading the `values` array from the config
properly sort and check for overlap.
@rneswold rneswold merged commit f3c2e8d into DrMemCS:main Aug 3, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant