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: add adjacency matrix #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

benjamanjiman
Copy link
Contributor

Previously adjacency is checked for every data point when calculating topographic error. Instead check adjacency for each pair of nodes in the map and use it as a lookup.

Briefly discussed here: #176

Previously adjacency is checked for every data point when calculating
topographic error. Instead check adjacency for each pair of nodes
in the map and use it as a lookup.
@JustGlowing
Copy link
Owner

Hi, thanks for submitting the pull request. This has little chances to be merged. The reason is that it introduces a mechanism to check the adjacency of nodes introducing new methods, but other methods use different ways to do so (see distance_map()).

I like the idea of using the adjacency matrix, but only if it's used consistently across the other methods.

@benjamanjiman
Copy link
Contributor Author

if we replaced the adjacency checks elsewhere with usage of the adjacency matrix, would that be acceptable?

@JustGlowing
Copy link
Owner

It seems quite a big a change and doesn't add much value. Exposing only the adjacency matrix with a public method is also acceptable.

The current priority is fixing this bug first: #172

@JustGlowing JustGlowing added the stale Stale Pr/Issue label Dec 21, 2023
@benjamanjiman
Copy link
Contributor Author

Coming back to this, i think the only places where adjacency is checked is in topographic error (both hex and rectangular would be replaced with one check to adjacency matrix) and distance map (which I believe can be simplified with a check to adjacency matrix, although unsure about efficiency impacts of indexing into weights vs iterating through the 6 possible neighbours). The other distance checks are the neig functions that all calculate distance differently anyway. Either way, happy to make the change to distance_map or to revert the change to topographic error and expose the adjacency matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement stale Stale Pr/Issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants