Ticket #11340 (closed defect: fixed)
Make nauty's geng work as a generator
|Reported by:||rbeezer||Owned by:||jason, ncohen, rlm|
|Cc:||ncohen, fidelbarrera||Work issues:|
|Report Upstream:||N/A||Reviewers:||Nathann Cohen|
|Authors:||Rob Beezer||Merged in:||sage-4.7.1.alpha2|
Description (last modified by rbeezer) (diff)
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.
- Cc ncohen, fidelbarrera added
- Status changed from new to needs_review
- Description modified (diff)
- Authors set to Rob Beezer
- Status changed from needs_review to positive_review