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

feat: ability to inverse weights of WalkerTableBuilder #6

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

DanArmor
Copy link
Contributor

@DanArmor DanArmor commented Oct 8, 2023

Maybe it can be useful for others
My use case, that lead to this:
I have an array of distances (for example [10, 30, 40, 50, 80]) and i want to pick more frequently shorter paths. So I just use implemented inverse() for table and get table as if the given distances were [80, 50, 40, 30, 10]
some more examples:
[1, 1, 10] inverse() [10, 10, 1] inverse() [1, 1, 10]
[5, 2, 6, 9] inverse() [4, 9, 3, 2] inverse() [5, 2, 6, 9]

@DanArmor
Copy link
Contributor Author

@ichi-h mentioning just in case

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