Changes between Version 7 and Version 8 of Ticket #18067


Ignore:
Timestamp:
04/01/15 09:29:42 (6 years ago)
Author:
vdelecroix
Comment:

more beautiful description!

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18067 – Description

    v7 v8  
    3535  Furthermore, the graphs created from a Numpy matrix inherited the 'weird'
    3636  NetworkX standards:
    37 
    3837{{{
    39       sage: import numpy
    40       sage: A = numpy.array([[0,1,1],[1,0,1],[1,1,0]])
    41       sage: Graph(A).edges()
    42       [(0, 1, {0: {'weight': 1}, 1: {'weight': 1}}),
    43        (0, 2, {0: {'weight': 1}, 1: {'weight': 1}}),
    44        (1, 2, {0: {'weight': 1}, 1: {'weight': 1}})]
     38sage: import numpy
     39sage: A = numpy.array([[0,1,1],[1,0,1],[1,1,0]])
     40sage: Graph(A).edges()
     41[(0, 1, {0: {'weight': 1}, 1: {'weight': 1}}),
     42(0, 2, {0: {'weight': 1}, 1: {'weight': 1}}),
     43(1, 2, {0: {'weight': 1}, 1: {'weight': 1}})]
    4544}}}
    4645
     
    5049
    5150  Before:
    52 
    5351{{{
    54       sage: g = Graph([(1,2,3),(1,2,4)], multiedges = False)
    55       ...
    56       ValueError: Two different labels given for the same edge in a graph without multiple edges.
     52sage: g = Graph([(1,2,3),(1,2,4)], multiedges = False)
     53...
     54ValueError: Two different labels given for the same edge in a graph without multiple edges.
    5755}}}
    5856
    5957  After:
    60 
    6158{{{
    62       sage: g = Graph([(1,2,3),(1,2,4)], multiedges = False)
    63       sage: g.edges()
    64       [(1, 2, 4)]
     59sage: g = Graph([(1,2,3),(1,2,4)], multiedges = False)
     60sage: g.edges()
     61[(1, 2, 4)]
    6562}}}
    6663
    6764  Note that it actually makes `Graph(list_of_edges)` behave as `add_edges`
    6865  already does, as in the latest release we have:
    69 
    7066{{{
    71       sage: g = Graph()
    72       sage: g.add_edges([(1,2,3),(1,2,4)])
    73       sage: g.edges()
    74       [(1, 2, 4)]
     67sage: g = Graph()
     68sage: g.add_edges([(1,2,3),(1,2,4)])
     69sage: g.edges()
     70[(1, 2, 4)]
    7571}}}
    7672
    7773- Fix a bug in `GenericGraph.has_multiple_edges`:
    78 
    7974{{{
    80       sage: g = Graph(loops=True,multiedges=True)
    81       sage: g.add_edge(0,0)
    82       sage: g.has_multiple_edges()
    83       True
     75sage: g = Graph(loops=True,multiedges=True)
     76sage: g.add_edge(0,0)
     77sage: g.has_multiple_edges()
     78True
    8479}}}
    8580