# Ticket #13411: trac_13411-smallfix.patch

File trac_13411-smallfix.patch, 1.6 KB (added by ncohen, 9 years ago)
• ## sage/graphs/graph_generators.py

```# HG changeset patch
# User Nathann Cohen <nathann.cohen@gmail.com>
# Date 1349184033 -7200
# Node ID 847104463fe53e636bdd48a10f8cc24b6f62bacf
# Parent  8ca52d065639927bf62a48c0044e34b5f9781808
Code cleanup and new layout for graphs.HoltGraph

diff --git a/sage/graphs/graph_generators.py b/sage/graphs/graph_generators.py```
 a sage: g.automorphism_group().cardinality() 54 """ from sage.rings.finite_rings.integer_mod_ring import Zmod from sage.combinat.cartesian_product import CartesianProduct g = graph.Graph(loops=False, name = "Holt graph", pos={}) for x,y in CartesianProduct(Zmod(9),Zmod(3)): g.add_edge((x,y),(4*x+1,y-1)) g.add_edge((x,y),(4*x-1,y-1)) g.add_edge((x,y),(7*x+7,y+1)) g.add_edge((x,y),(7*x-7,y+1)) _circle_embedding(g, [(x,y) for y in Zmod(3) for x in Zmod(9)]) for x in range(9): for y in range(3): g.add_edge((x,y),((4*x+1)%9,(y-1)%3)) g.add_edge((x,y),((4*x-1)%9,(y-1)%3)) g.add_edge((x,y),((7*x+7)%9,(y+1)%3)) g.add_edge((x,y),((7*x-7)%9,(y+1)%3)) for j in range(0,6,2): _line_embedding(g, [(x,j/2) for x in range(9)], first=(cos(2*j*pi/6),sin(2*j*pi/6)), last=(cos(2*(j+1)*pi/6),sin(2*(j+1)*pi/6))) return g def LjubljanaGraph(self, embedding=1):