# HG changeset patch
# User Keshav Kini
# Date 1337816242 25200
# Node ID adae90472437d40b5e5659caa2d9f3645ed894d4
# Parent 8a3cdded007083c2415a50df16c5ce4e754be179
Formatting, typos, faster casting, dead code
diff git a/sage/graphs/graph_generators.py b/sage/graphs/graph_generators.py
 a/sage/graphs/graph_generators.py
+++ b/sage/graphs/graph_generators.py
@@ 4203,14 +4203,15 @@
H.set_pos(pos_dict)
return H
 def LjubljanaGraph(self, embedding = 1):
+ def LjubljanaGraph(self, embedding=1):
r"""
Returns the Ljubljana Graph.
 The Ljubljana graph is a bipartite 3regular graph on 112 vertices and
 168 edges. It is not vertextransitive as it has two orbits which are
 also independent sets og size 56. See the :wikipedia:`Wikipedia page on
 the Ljubljana Graph `.
+ The Ljubljana graph is a bipartite 3regular graph on 112
+ vertices and 168 edges. It is not vertextransitive as it has
+ two orbits which are also independent sets of size 56. See the
+ :wikipedia:`Wikipedia page on the Ljubljana Graph
+ `.
The default embedding is obtained from the Heawood graph.
@@ 4255,7 +4256,7 @@
elif embedding == 2:
dh = graphs.HeawoodGraph().get_pos()
 # Correspondance between the vertices of the Heawood Graph and
+ # Correspondence between the vertices of the Heawood Graph and
# 8sets of the Ljubljana Graph.
d = {
@@ 4275,19 +4276,18 @@
5: [14, 34, 108, 70, 96, 90, 52, 40]
}
 # The vertices of each 8set is plotted on a circle, and the circles
 # is slowly shifted to obtain a symmetric drawing.
+ # The vertices of each 8set are plotted on a circle, and the
+ # circles are slowly shifted to obtain a symmetric drawing.
for i, (u, vertices) in enumerate(d.iteritems()):
 i = i+0.
 _circle_embedding(g, vertices, center=dh[u], radius=.1, shift=8*i/14)
+ _circle_embedding(g, vertices, center=dh[u], radius=.1,
+ shift=8.*i/14)
return g
+
else:
raise ValueError("The value of embedding must be 1 or 2.")
 return g

def KneserGraph(self,n,k):
r"""
Returns the Kneser Graph with parameters `n, k`.