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

Possible Graph Implementations #4

Open
maxfischer2781 opened this issue Aug 5, 2018 · 1 comment
Open

Possible Graph Implementations #4

maxfischer2781 opened this issue Aug 5, 2018 · 1 comment

Comments

@maxfischer2781
Copy link
Contributor

Get real with the purpose of the GraphI Interface: implement additional, optimised graph types.

  • Adjacency Matrix: A literal NxN matrix storing the edge values between nodes (row/column). Probably works only with integer valued nodes.
    • Provide a graph[int, int]->number optimisation using numpy arrays.
    • Offer a wrapper to transform arbitrary nodes to indices.
  • Adjacency Mapping: Combination of AdjacencyGraph and an Adjacency Matrix, for sparse graphs and any hashable nodes. Store a Dict[Node] -> List[Node] for neighbours of a node, and a Dict[Node, Node] -> Object for values of edges.
    • We can probably calculate/estimate the savings/cost. See stackoverflow for the behaviour of dict.
@maxfischer2781
Copy link
Contributor Author

See also issue #3 to compare different types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant