#18828: Export graph to file
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_work
Type: | Milestone: sage-6.8
enhancement | Resolution:
Priority: major | Merged in:
Component: graph | Reviewers:
theory | Work issues:
Keywords: | Commit:
Authors: | 1bd29e566d28ac731e920d8aa6c70913ede27cb0
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/18828 |
Dependencies: |
-------------------------+-------------------------------------------------
Comment (by ncohen):
Hello,
> I have a little trouble understanding the goal of this ticket: would you
like to have only one standard function to save graphs, instead of calling
different NetworkX functions, right?
Yes
> Because, for instance, if I want to save a file in adjlist format I can
simply type:
That's what the branch does, too. Only you may not know that those
functions can be found in networkx.
> In any case, I have tried to compile this code, both with `make` and
with `make distclean && make`, and it works! Some small suggestions:
>
> * could you make a test that checks if the output is correct?
I added one check, but it is unpleasant in many ways. First, the (integer)
vertices become strings, and then each edge gets a label encoding a
weight. Well, that's networkx...
> * "the format is ‘guessed’ from the extension ..." maybe it is better
to say "the format is the extension", because you do not guess, you simply
use the extension.
How is that not a guess? Anyway, udpated.
> * I would add a link to the NetworkX manual
(!http://networkx.lanl.gov/reference/readwrite.html), where the different
file formats are detailed.
Done.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/18828#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.