#18864: New method for the eccentricity of undirected graphs
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  dcoudert               |       Status:  needs_work
           Type:         |    Milestone:  sage-6.8
  enhancement            |   Resolution:
       Priority:  minor  |    Merged in:
      Component:  graph  |    Reviewers:  Michele Borassi
  theory                 |  Work issues:
       Keywords:         |       Commit:
        Authors:  David  |  80cb89935d8eb8288d6659d7c73d8c05ee1c9411
  Coudert                |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/18864           |
   Dependencies:         |
-------------------------+-------------------------------------------------
Changes (by vbraun):

 * status:  positive_review => needs_work


Comment:

 Can you guys settle on a pattern where you return Sage integers
 everywhere? Not only would that then work on 32-bit as well, it would also
 give Sage a consistent user interface. `graph.radius().factor()` should
 just work.
 {{{
 sage -t --long src/sage/graphs/distances_all_pairs.pyx
 **********************************************************************
 File "src/sage/graphs/distances_all_pairs.pyx", line 835, in
 sage.graphs.distances_all_pairs.eccentricity
 Failed example:
     eccentricity(g)
 Expected:
     [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
 Got:
     [2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L]
 **********************************************************************
 File "src/sage/graphs/distances_all_pairs.pyx", line 854, in
 sage.graphs.distances_all_pairs.eccentricity
 Failed example:
     eccentricity(g, method='standard')
 Expected:
     [2, +Infinity, +Infinity]
 Got:
     [2L, +Infinity, +Infinity]
 **********************************************************************
 1 item had failures:
    2 of  18 in sage.graphs.distances_all_pairs.eccentricity
     [82 tests, 2 failures, 0.20 s]
 sage -t --long src/sage/graphs/dot2tex_utils.py
     [4 tests, 0.06 s]
 sage -t --long src/sage/graphs/generators/__init__.py
     [0 tests, 0.00 s]
 sage -t --long src/sage/graphs/generators/basic.py
 **********************************************************************
 File "src/sage/graphs/generators/basic.py", line 60, in
 sage.graphs.generators.basic.BullGraph
 Failed example:
     g.radius(); g.diameter(); g.girth()
 Expected:
     2
     3
     3
 Got:
     2L
     3
     3
 **********************************************************************
 File "src/sage/graphs/generators/basic.py", line 130, in
 sage.graphs.generators.basic.ButterflyGraph
 Failed example:
     G.radius()
 Expected:
     1
 Got:
     1L
 **********************************************************************
 2 items had failures:
    1 of  14 in sage.graphs.generators.basic.BullGraph
    1 of  11 in sage.graphs.generators.basic.ButterflyGraph
     [191 tests, 2 failures, 16.25 s]
 sage -t --long src/sage/graphs/digraph_generators.py
     [81 tests, 5.09 s]
 sage -t --long src/sage/graphs/generators/chessboard.py
     [44 tests, 1.04 s]
 sage -t --long src/sage/graphs/generators/degree_sequence.py
     [23 tests, 1.11 s]
 sage -t --long src/sage/geometry/triangulation/point_configuration.py
     [202 tests, 23.07 s]
 sage -t --long src/sage/graphs/generators/intersection.py
     [71 tests, 0.35 s]
 sage -t --long src/sage/graphs/generators/platonic_solids.py
     [44 tests, 4.55 s]
 sage -t --long src/sage/graphs/generators/families.py
 **********************************************************************
 File "src/sage/graphs/generators/families.py", line 815, in
 sage.graphs.generators.families.FriendshipGraph
 Failed example:
     G.radius()
 Expected:
     1
 Got:
     1L
 **********************************************************************
 1 item had failures:
    1 of  22 in sage.graphs.generators.families.FriendshipGraph
     [250 tests, 1 failure, 22.30 s]
 sage -t --long src/sage/geometry/triangulation/base.pyx
     [171 tests, 35.66 s]
 sage -t --long src/sage/graphs/generators/world_map.py
     [4 tests, 0.01 s]
 sage -t --long src/sage/graphs/generators/random.py
     [71 tests, 5.22 s]
 sage -t --long src/sage/graphs/generic_graph_pyx.pxd
     [0 tests, 0.00 s]
 sage -t --long src/sage/graphs/generic_graph_pyx.pyx
     [79 tests, 2.49 s]
 sage -t --long src/sage/graphs/generators/smallgraphs.py
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 1302, in
 sage.graphs.generators.smallgraphs.BrinkmannGraph
 Failed example:
     G.radius()
 Expected:
     3
 Got:
     3L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 1650, in
 sage.graphs.generators.smallgraphs.MeredithGraph
 Failed example:
     g.radius()
 Expected:
     7
 Got:
     7L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 1701, in
 sage.graphs.generators.smallgraphs.KittellGraph
 Failed example:
     g.radius()
 Expected:
     3
 Got:
     3L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 1808, in
 sage.graphs.generators.smallgraphs.ChvatalGraph
 Failed example:
     G.radius(); G.diameter(); G.girth()
 Expected:
     2
     2
     4
 Got:
     2L
     2
     4
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 2058, in
 sage.graphs.generators.smallgraphs.DyckGraph
 Failed example:
     G.radius()
 Expected:
     5
 Got:
     5L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 2129, in
 sage.graphs.generators.smallgraphs.HortonGraph
 Failed example:
     g.radius()
 Expected:
     10
 Got:
     10L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 2372, in
 sage.graphs.generators.smallgraphs.ErreraGraph
 Failed example:
     G.radius()
 Expected:
     3
 Got:
     3L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 2581, in
 sage.graphs.generators.smallgraphs.FranklinGraph
 Failed example:
     G.radius()
 Expected:
     3
 Got:
     3L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 2697, in
 sage.graphs.generators.smallgraphs.GoldnerHararyGraph
 Failed example:
     G.radius()
 Expected:
     2
 Got:
     2L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 2821, in
 sage.graphs.generators.smallgraphs.GrotzschGraph
 Failed example:
     G.radius()
 Expected:
     2
 Got:
     2L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 2943, in
 sage.graphs.generators.smallgraphs.HerschelGraph
 Failed example:
     G.radius()
 Expected:
     3
 Got:
     3L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 3257, in
 sage.graphs.generators.smallgraphs.HoffmanGraph
 Failed example:
     g.radius()
 Expected:
     3
 Got:
     3L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 3306, in
 sage.graphs.generators.smallgraphs.HoltGraph
 Failed example:
     g.radius()
 Expected:
     3
 Got:
     3L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 3835, in
 sage.graphs.generators.smallgraphs.MoserSpindle
 Failed example:
     G.radius()
 Expected:
     2
 Got:
     2L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 4150, in
 sage.graphs.generators.smallgraphs.ShrikhandeGraph
 Failed example:
     G.radius()
 Expected:
     2
 Got:
     2L
 **********************************************************************
 File "src/sage/graphs/generators/smallgraphs.py", line 4294, in
 sage.graphs.generators.smallgraphs.SousselierGraph
 Failed example:
     g.radius()
 Expected:
     2
 Got:
     2L
 **********************************************************************
 16 items had failures:
    1 of  14 in sage.graphs.generators.smallgraphs.BrinkmannGraph
    1 of   9 in sage.graphs.generators.smallgraphs.ChvatalGraph
    1 of  15 in sage.graphs.generators.smallgraphs.DyckGraph
    1 of  14 in sage.graphs.generators.smallgraphs.ErreraGraph
    1 of  13 in sage.graphs.generators.smallgraphs.FranklinGraph
    1 of  12 in sage.graphs.generators.smallgraphs.GoldnerHararyGraph
    1 of  12 in sage.graphs.generators.smallgraphs.GrotzschGraph
    1 of  13 in sage.graphs.generators.smallgraphs.HerschelGraph
    1 of   7 in sage.graphs.generators.smallgraphs.HoffmanGraph
    1 of  10 in sage.graphs.generators.smallgraphs.HoltGraph
    1 of   9 in sage.graphs.generators.smallgraphs.HortonGraph
    1 of   8 in sage.graphs.generators.smallgraphs.KittellGraph
    1 of  10 in sage.graphs.generators.smallgraphs.MeredithGraph
    1 of  12 in sage.graphs.generators.smallgraphs.MoserSpindle
    1 of  15 in sage.graphs.generators.smallgraphs.ShrikhandeGraph
    1 of  10 in sage.graphs.generators.smallgraphs.SousselierGraph
     [541 tests, 16 failures, 25.01 s]
 sage -t --long src/sage/graphs/genus.pyx
     [52 tests, 13.20 s]
 sage -t --long src/sage/graphs/graph_coloring.py
     [75 tests, 3.86 s]
 sage -t --long src/sage/graphs/graph_database.py
     [56 tests, 0.16 s]
 sage -t --long src/sage/graphs/graph_decompositions/__init__.py
     [0 tests, 0.00 s]
 sage -t --long src/sage/graphs/graph_decompositions/bandwidth.pyx
     [14 tests, 0.07 s]
 sage -t --long src/sage/graphs/graph.py
     [669 tests, 13.92 s]
 sage -t --long src/sage/graphs/graph_decompositions/fast_digraph.pxd
     [0 tests, 0.00 s]
 sage -t --long src/sage/graphs/graph_decompositions/fast_digraph.pyx
     [1 test, 0.00 s]
 sage -t --long src/sage/graphs/graph_decompositions/graph_products.pyx
     [15 tests, 0.07 s]
 sage -t --long src/sage/graphs/graph_decompositions/rankwidth.pxd
     [0 tests, 0.00 s]
 sage -t --long src/sage/graphs/graph_decompositions/rankwidth.pyx
     [23 tests, 0.03 s]
 sage -t --long src/sage/graphs/graph_decompositions/vertex_separation.pxd
     [0 tests, 0.00 s]
 sage -t --long src/sage/graphs/generic_graph.py
 **********************************************************************
 File "src/sage/graphs/generic_graph.py", line 12686, in
 sage.graphs.generic_graph.GenericGraph.eccentricity
 Failed example:
     G.eccentricity()
 Expected:
     [4, 4, 4, 4, 4, 3, 3, 2, 3, 4]
 Got:
     [4L, 4L, 4L, 4L, 4L, 3L, 3L, 2L, 3L, 4L]
 **********************************************************************
 File "src/sage/graphs/generic_graph.py", line 12700, in
 sage.graphs.generic_graph.GenericGraph.eccentricity
 Failed example:
     G.eccentricity(with_labels=True)
 Expected:
     {0: 0}
 Got:
     {0: 0L}
 **********************************************************************
 File "src/sage/graphs/generic_graph.py", line 12753, in
 sage.graphs.generic_graph.GenericGraph.radius
 Failed example:
     G.radius()
 Expected:
     3
 Got:
     3L
 **********************************************************************
 File "src/sage/graphs/generic_graph.py", line 12761, in
 sage.graphs.generic_graph.GenericGraph.radius
 Failed example:
     G.radius()
 Expected:
     2
 Got:
     2L
 **********************************************************************
 2 items had failures:
    2 of  13 in sage.graphs.generic_graph.GenericGraph.eccentricity
    2 of   9 in sage.graphs.generic_graph.GenericGraph.radius
     [2707 tests, 4 failures, 52.37 s]
 }}}

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