Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Convenience graph creators #6

Closed
razziel89 opened this issue Dec 17, 2021 · 2 comments
Closed

Convenience graph creators #6

razziel89 opened this issue Dec 17, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@razziel89
Copy link
Owner

razziel89 commented Dec 17, 2021

Creating regular graphs is not too easy right now. It would be cool to be able to create graphs from regular grids with minimal commands.

Features:

  • Provide grid size in all dimensions
  • Provide metric function used to determine whether two nodes are neighbours (requires iteration over entire grid for every point, which is inefficient)
  • Provide list of displacements to reach neighbours (remember to track node positions in the creation algorithm, this is very similar to the example in the readme)
  • Take function that retrieves cost for each node, allow nil, in which case the cost will have to be set manually
  • Take name creator function
  • Make sure to add position as payload
@razziel89 razziel89 self-assigned this Dec 17, 2021
@razziel89 razziel89 added the enhancement New feature or request label Dec 17, 2021
@razziel89 razziel89 removed their assignment Dec 17, 2021
@razziel89 razziel89 mentioned this issue Dec 21, 2021
@razziel89
Copy link
Owner Author

A 2-D graph creator will be added. And N-D version could be added once there are generics. For now, the function is straightforward to modify for other dimensionalities in case users require higher dimensions.

@razziel89
Copy link
Owner Author

Implemented via #26. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant