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

A spatial graph #22

Open
makingthematrix opened this issue Jan 6, 2018 · 0 comments
Open

A spatial graph #22

makingthematrix opened this issue Jan 6, 2018 · 0 comments
Assignees
Labels
Projects
Milestone

Comments

@makingthematrix
Copy link
Owner

makingthematrix commented Jan 6, 2018

In future I imagine having a general Graph class with spatial graphs and state diagrams as subclasses. (I know, in Rust there are no classes, but the term is useful anyway). But for the 0.1 milestone state diagrams are not necessary, so I may as well focus on delivering a fully functional spatial graph.

This is a meta-feature. It shall be expanded:

  1. Implement SpatialGraph<T> with nodes identified by NodeId and having as values Positions and additional data structures T. The way to implement edges between nodes still not clear. Maybe a set of tuples (NodeId, NodeId). Maybe a map of NodeId to Vector<NodeId>. Positions should be unique per node - the programmer can't create a graph with two different nodes having the same positions. Add an alias for SpatialGraph<Cell>.
  2. Implement SpatialGraphBuilder<T> ... for building spatial graphs! Add an alias for SpatialGraphBuilder<Cell>.
  3. Methods for filtering nodes and returning sets of NodeId and for finding any node fulfilling the requirement (and exists, and forall).
  4. foreach method
  5. a method returning a SpatialGraph<T> subset only with specified nodes (that means the graph may not be connected)
  6. a method for finding the closest node
  7. a method for finding a path between two nodes and returning it as a set of NodeId
  8. a utility method nextOrCurrent returning the next point on the path, or the current one, if it's the last one in the path
  9. a utility method for checking if the graph is connected
  10. methods for adding and deleting nodes and edges, and inverting the graph.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
GAI Core
  
Backlog
Development

No branches or pull requests

1 participant