Ticket #14271: trac_14271-layouts.patch

File trac_14271-layouts.patch, 1.4 KB (added by ncohen, 8 years ago)
  • sage/graphs/generators/smallgraphs.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1363947413 -3600
    # Node ID d4866236c0adcdfdcf89a4184b9b811c6ef93935
    # Parent  c73f5485180f2b3bcac9266d26550fe5ab4a88cf
    Layout for Sylvester and Sims-Gewirtz graphs
    
    diff --git a/sage/graphs/generators/smallgraphs.py b/sage/graphs/generators/smallgraphs.py
    a b  
    30973097    e = g.edge_iterator(labels = False).next()
    30983098    g.delete_vertices(g.neighbors(e[0]) + g.neighbors(e[1]))
    30993099    g.relabel()
     3100    ordering = [0, 1, 2, 4, 5, 9, 16, 35, 15, 18, 20, 30, 22, 6, 33, 32, 14,
     3101                10, 28, 29, 7, 24, 23, 26, 19, 12, 13, 21, 11, 31, 3, 27, 25,
     3102                17, 8, 34]
     3103    _circle_embedding(g,ordering, shift=.5)
    31003104    g.name("Sylvester Graph")
    3101     g.set_pos({})
    31023105    return g
    31033106
    31043107def SimsGewirtzGraph():
     
    31343137    e = g.edge_iterator(labels = False).next()
    31353138    g.delete_vertices(g.neighbors(e[0]) + g.neighbors(e[1]))
    31363139    g.relabel()
     3140    ordering = [0, 2, 3, 4, 6, 7, 8, 17, 1, 41, 49, 5, 22, 26, 11, 27, 15, 47,
     3141                53, 52, 38, 43, 44, 18, 20, 32, 19, 42, 54, 36, 51, 30, 33, 35,
     3142                37, 28, 34, 12, 29, 23, 55, 25, 40, 24, 9, 14, 48, 39, 45, 16,
     3143                13, 21, 31, 50, 10, 46]
     3144    _circle_embedding(g,ordering)
    31373145    g.name("Sims-Gewirtz Graph")
    3138     g.set_pos({})
    31393146    return g
    31403147
    31413148def ThomsenGraph():