# Ticket #14547: trac_14547_review.patch

File trac_14547_review.patch, 1.6 KB (added by chapoton, 7 years ago)
• ## sage/graphs/generators/smallgraphs.py

```# HG changeset patch
# User Frederic Chapoton <chapoton at math.univ-lyon1.fr>
# Date 1373274887 -7200
# Node ID 58cafce80e500fe638e65fedd35161fb4b4fccd1
# Parent  a00210b2da29b6dc9b9c29759812499439883dae
trac 14547 review patch for mclaughlin graph

diff --git a/sage/graphs/generators/smallgraphs.py b/sage/graphs/generators/smallgraphs.py```
 a def McLaughlinGraph(): from sage.sets.set import Set blocks = WittDesign(23).blocks() blocks = map(Set,blocks) B = [b for b in blocks if     0 in b] blocks = map(Set, blocks) B = [b for b in blocks if 0 in b] C = [b for b in blocks if not 0 in b] g = graph.Graph() for b in B: for x in range(23): if not x in b: g.add_edge(b,x) g.add_edge(b, x) for b in C: for x in b: g.add_edge(b,x) for b,bb in combinations(B,2): if len(b&bb) == 1: g.add_edge(b,bb) for c,cc in combinations(C,2): if len(c&cc) == 1: g.add_edge(c,cc) g.add_edge(b, x) for b, bb in combinations(B, 2): if len(b & bb) == 1: g.add_edge(b, bb) for c, cc in combinations(C, 2): if len(c & cc) == 1: g.add_edge(c, cc) for b in B: for c in C: if len(b&c) == 3: g.add_edge(b,c) if len(b & c) == 3: g.add_edge(b, c) g.relabel() g.name("McLaughlin")