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
Interface nauty's directg command with sage #27231
Comments
Branch: u/vklein/27231 |
Commit: |
This comment has been minimized.
This comment has been minimized.
New commits:
|
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:5
This is a nice addition. Thank you. Below are some comments.
- Returns a list which creates digraphs from nauty's directg program.
+ Return an iterator yielding digraphs using nauty's ``directg`` program.
- - ``graphs`` (iterable) -- A :class:`Graph` or an iterable containing
- :class:`Graph`.
+ - ``graphs`` -- a :class:`Graph` or an iterable containing :class:`Graph`
- if l != '' and l[0] == '&':
+ if l and l[0] == '&':
|
comment:6
Replying to @dcoudert:
Yes my mistake ! It's a generator to be accurate. My first version used to return a list. Thanks for noticing that.
The impacting difference between That's why i use The drawback is, if i am right, that with communicate reading stdout is in one go where we can read line by line for
No i was unaware of that. Thanks for your comments. |
comment:8
Comparison 1 - For generating/counting digraph without generating output watercluster2 is way faster.
If you take the time to generate output into account the result is less clear.
For the tests below the two functions used just read the command output.
My current problem with the binary output is that what i get is not consistent with the specifications (Which are in watercluster2 source code) and therefore i don't know how to build DiGraph with that. 2 - Command options.
I don't know what is the most useful set of options between these two. I guess we should stick with |
comment:9
Thanks for the benchmark. I agree to stay with Also, can you do - yield DiGraph(l[1:])
+ yield DiGraph(l[1:], format='dig6') and add tests like |
comment:10
Replying to @dcoudert:
Well my results are :
For K5 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:12
Reviewer's comments implemented apart from comparison with |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
- Return an iterator yielding digraphs using nauty's ``directg`` program.
- Description from directg --help:
+ Return an iterator yielding digraphs using nauty's ``directg`` program.
+
+ Description from directg --help:
It appears that the digraphs generated with However, you could add a
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
All comments implemented. The case with Note that to stick with this generator description i prefer to let Thank you for your comments. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:19
Some more comments (should be the last one)
- :meth:`~DiGraphGenerators.nauty_directg` | Returns a digraph generator using Nauty's directg command.
+ :meth:`~DiGraphGenerators.nauty_directg` | Return an iterator yielding digraphs using nauty's ``directg`` program.
|
comment:20
Replying to @dcoudert:
Yes that's how python's generators works. Calling the generator's function create the generator object but don't begin to execute the code inside the function:
|
Reviewer: David Coudert |
comment:21
I didn't know that. Thanks. So you just have to include my last comments. |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:23
Rebase on sage8.7.beta3 and implement last reviewer's comments. |
comment:24
LGTM. Tested on py2 and py3. |
Changed branch from u/vklein/27231 to |
comment:26
Thanks. There is user demand for this, see Follow-up ticket at #27686 for a documentation issue raised in that Ask Sage question. |
Changed commit from |
Allow to call nauty's directg command from sage.
This is implemented as a
DiGraph
generator (file:digraph_generators.py
).Note to reviewers: Any idea for useful examples in documentation is welcome.
CC: @dcoudert @videlec
Component: graph theory
Keywords: thursdaysbdx
Author: Vincent Klein
Branch:
ccc2cd3
Reviewer: David Coudert
Issue created by migration from https://trac.sagemath.org/ticket/27231
The text was updated successfully, but these errors were encountered: