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

Is it possible to alter a graph after its creation? #110

Closed
troelsarvin opened this issue May 14, 2023 · 2 comments
Closed

Is it possible to alter a graph after its creation? #110

troelsarvin opened this issue May 14, 2023 · 2 comments

Comments

@troelsarvin
Copy link

Is it possible to alter a graph after its creation, or is a graph read-only?
I.e. is something like this possible?
https://docs.rs/dendron/0.1.5/dendron/node/struct.Node.html#method.create_as_first_child

@waynevanson
Copy link

Read only from the looks of it.
I don't see any mutability in the API.
Implementations use Box<T> for values, meaning values cannot be added.

Petgraph is a library that uses mutability.

@s1ck
Copy link
Collaborator

s1ck commented Jun 8, 2023

We started out with immutable graphs and focused on creating such graphs in a parallel fashion. Updating our internal CSR data structure is certainly possible, but would require quite some changes.

For small graphs, I can imagine a builder API that allows you to add nodes and edges and turns this into a mutable graph. Would that be something that works? Otherwise, as @waynevanson suggested, petgraph has mutable graphs, but no scale-up capabilities.

@s1ck s1ck closed this as completed Jun 13, 2023
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

3 participants