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

Try to use petgraph::csr as an internal representation for a Network #9

Closed
adinapoli-mndc opened this issue Jul 23, 2019 · 2 comments
Closed

Comments

@adinapoli-mndc
Copy link
Contributor

adinapoli-mndc commented Jul 23, 2019

At the moment we define:

pub struct Network {
    from_graph: petgraph::Graph<Artifact, Dependency, Directed>,
}

However the Graph types uses adjacency lists under the hook, whereas our graph is likely to be sparse for the most parts. petgraph offers a petgraph::csr::Csr variant, but it doesn't seem to be a drop-in replacement, so this has to be investigated.

@adinapoli-mndc
Copy link
Contributor Author

After some more investigation, I am not sure this can be easily achieved, as the API seems to be quite different between the two implementation. add_edge, for example, returns an EdgeIndex for the Graph API, but just a bool for the Csr one.

@adinapoli-mndc
Copy link
Contributor Author

I feel this is now a dupe of #29, so I am going to close it.

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