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

Support on-the-fly node creation #22

Open
razziel89 opened this issue Jan 6, 2022 · 0 comments
Open

Support on-the-fly node creation #22

razziel89 opened this issue Jan 6, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@razziel89
Copy link
Owner

razziel89 commented Jan 6, 2022

There are cases when the approach of first creating all nodes and then finding a path through them is not ideal, e.g. when the possible number of nodes is so large that they do not all fit in memory. Instead, nodes can be created programmatically. That is, a new type of node implementing the node interfaces (cf. #19) can be created whose Connections method then provides all nodes. There is one major challenge here: currently, nodes are identified uniquely via pointers to them. When programmatically creating neighbouring nodes, some other means of uniquely ID'ing nodes is required. Suggestion: require unique names that follow some scheme, or require some hashing function that generates an ID based on a node. Implementing this without generics can be tricky. With generics, the ID type can be specified by the user as long as the ID method returns data of that type. Maybe wait until go 1.18 has been released to employ generics.

Requires these:

@razziel89 razziel89 added the enhancement New feature or request label Jan 7, 2022
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