-
Notifications
You must be signed in to change notification settings - Fork 354
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
Add graph6 format encoder and decoder for undirected graphs #658
Conversation
Could you please put more details where this format is used? Because it's unclear from the description. Worth adding this information in the commit message as well. |
format for storing undirected graphs in a compact manner, using only printable ASCII characters. files in this format have text type and contain one line per graph. graph6 is suitable for small graphs, or large dense graphs. encoded graph examples: * petersen: IheA@GUAo * 30 vertices and 124 edges: GBYAcCC?JYOoq?_BgG?G@Kcig?C[cDacRBBS`DGGOMO@[A?isvUK?QOofI_SOSG_O?ahXGD?? format reference: https://users.cecs.anu.edu.au/~bdm/data/formats.txt other implementations and usages: * networkX: https://networkx.org/documentation/stable/reference/readwrite/sparsegraph6.html * Wolfram: https://reference.wolfram.com/language/ref/format/Graph6.html.en * SageMath: https://doc.sagemath.org/html/en/reference/graphs/sage/graphs/graph.html#sage.graphs.graph.Graph.graph6_string * nauty tool: https://pallini.di.uniroma1.it/
limit indexmap version since its latest release broke petgraph MSRV
hi @XVilka, thanks for the follow up on this updated both the commit message and the PR description |
@@ -35,7 +35,7 @@ debug = true | |||
|
|||
[dependencies] | |||
fixedbitset = { version = "0.4.0", default-features = false } | |||
indexmap = "2.0" | |||
indexmap = "~2.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't do this! It prevents users with more current compilers from using the latest petgraph and indexmap together, even though they would otherwise work fine.
A better way is to downgrade it just for your MSRV CI, either manually with cargo update --precise
or using Rust 1.84's new resolver (in beta) before running the test with your actual MSRV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also just hit this, since I have another dependency that specifies indexmap = "2.7"
.
Add graph6 format encoder and decoder for undirected graphs.
Format for storing undirected graphs in a compact manner, using only printable ASCII characters.
Files in this format have text type and contain one line per graph.
graph6
is suitable for small graphs, or large dense graphs.encoded graph examples:
IheA@GUAo
GBYAcCC?JYOoq?_BgG?G@Kcig?C[cDacRBBS`DGGOMO@[A?isvUK?QOofI_SOSG_O?ahXGD??
Format reference: https://users.cecs.anu.edu.au/~bdm/data/formats.txt
Other implementations and usages:
graph6
can be used as an input and output format