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
Make nauty's geng work as a generator #11340
Comments
Attachment: trac_11340-nauty-geng-generator.patch.gz |
Author: Rob Beezer |
This comment has been minimized.
This comment has been minimized.
comment:2
Nice patch ! Everything seems perfect, and I just have a question : what about removing the options which change the output, as the method would not be able to cast them to Sage graph ? If it is just in case the user would like to change the output with "debug = True", what about : "do not set an option to change this default or results will be unpredictable, unless Nathann |
comment:3
Attachment: trac_11340-nauty-geng-generator-v2.patch.gz Replying to @nathanncohen:
Nathann - thanks for having a look at this. That's a good point - no reason to advertise options that would be harmful. I had not taken such a close look at what I was putting there. v2 patch is standalone, it removes these options from the list, and adds a bit more commentary about these options. I also spruced up the doctests a bit. No changes to the code. Thanks, |
This comment has been minimized.
This comment has been minimized.
comment:4
Goooooooood to go ! Thanks !! Nathann |
comment:5
Replying to @nathanncohen:
Thanks for the quick review! Rob |
comment:6
I try to keep the tickets waiting for review in the Graph section to the bare minimum : those I can not review myself Nathann |
Reviewer: Nathann Cohen |
Merged: sage-4.7.1.alpha2 |
Output produced by nauty's geng program can be quite large. Currently, an entire list is created and returned. The 1,018,997,864 graphs on n=11 vertices can overwhelm RAM when produced all at once. This patch reorganizes the
nauty_geng()
command to produce a generator, so graphs can be created, tested and then discarded or saved - which would be the typical use of this command. Of course, for smaller values of n it is still possible to quickly build a list from the generator.This also upgrades the system call, since
os.popen()
is deprecated in Python.Apply:
CC: @nathanncohen @sagetrac-fidelbarrera
Component: graph theory
Author: Rob Beezer
Reviewer: Nathann Cohen
Merged: sage-4.7.1.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/11340
The text was updated successfully, but these errors were encountered: