#18828: Export graph to file
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.8
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  c019634f9a18798786f80c2c3254b2263f58f7d8
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/18828         |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by dcoudert):

 I propose to add extend the tests in the following way. Let me know if you
 agree before I push a commit.
 {{{
 sage: g = graphs.PetersenGraph()
 sage: filename = tmp_filename(ext=".pajek")
 sage: g.export_to_file(filename)
 sage: import networkx
 sage: h = Graph( networkx.read_pajek(filename)
 sage: g.is_isomorphic(h)
 True
 sage: filename = tmp_filename(ext=".edgelist")
 sage: g.export_to_file(filename, data=False)
 sage: h = Graph( networkx.read_edgelist(filename)
 sage: g.is_isomorphic(h)
 True
 }}}
 Relying on vertex names is unfortunately not possible yet since the read
 method turns vertex id like `13` to `u'13'`.

--
Ticket URL: <http://trac.sagemath.org/ticket/18828#comment:14>
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.

Reply via email to