#19301: Improved Graph.complement() (and cleanup in dense_graph.pyx)
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.9
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:  graph  |    Reviewers:
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  548b8f012647c1fae0ab8d080f2f27a382c39d51
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/ncohen/19301         |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by dcoudert):

 I like this patch ;)

 However, there is a small issue:
 {{{
 sage -t --long src/sage/graphs/generic_graph.py
 **********************************************************************
 File "src/sage/graphs/generic_graph.py", line 16320, in
 sage.graphs.generic_graph.GenericGraph.complement
 Failed example:
     G.complement()
 Expected:
     Traceback (most recent call last):
     ...
     TypeError: complement not well defined for (di)graphs with multiple
 edges
 Got:
     <BLANKLINE>
     Traceback (most recent call last):
       File "/Users/dcoudert/sage/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 496, in _run
         self.compile_and_execute(example, compiler, test.globs)
       File "/Users/dcoudert/sage/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 858, in compile_and_execute
         exec(compiled, globs)
       File "<doctest
 sage.graphs.generic_graph.GenericGraph.complement[9]>", line 1, in
 <module>
         G.complement()
       File "/Users/dcoudert/sage/local/lib/python2.7/site-
 packages/sage/graphs/generic_graph.py", line 16341, in complement
         self._scream_if_not_simple()
       File "/Users/dcoudert/sage/local/lib/python2.7/site-
 packages/sage/graphs/generic_graph.py", line 1257, in
 _scream_if_not_simple
         raise ValueError(msg)
     ValueError: This method is not known to work on graphs with
 multiedges. Perhaps this method can be updated to handle them, but in the
 meantime if you want to use it please disallow multiedges using
 allow_multiple_edges().
 **********************************************************************
 1 item had failures:
    1 of  15 in sage.graphs.generic_graph.GenericGraph.complement
     [2950 tests, 1 failure, 56.23 s]
 ----------------------------------------------------------------------
 sage -t --long src/sage/graphs/generic_graph.py  # 1 doctest failed
 ----------------------------------------------------------------------
 }}}
 Sorry, I know you don't like multiple edges ;)

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