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

Idea for faster distances #91

Open
johnlees opened this issue Apr 12, 2023 · 0 comments
Open

Idea for faster distances #91

johnlees opened this issue Apr 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@johnlees
Copy link
Member

  • Sort the columns of bins (N log N), keeping track of index.
  • Scan through column. Where there is a block of the same value, add one to numerator of all vs all indices in block
  • When closely related, can instead subtract one from those not in the block

This could be faster when either most of the values are the same (close distances) or different.

The output is still N^2 in size. Doing this in a way where distant neighbours are dropped as each column is processed might be a way to make this linear.

@johnlees johnlees added the enhancement New feature or request label Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant