@@ -48,7 +48,7 @@ def SymplecticPolarGraph(d, q, algorithm=None):
48
48
49
49
Computation of the spectrum of `Sp(6,2)`::
50
50
51
- sage: g = graphs.SymplecticPolarGraph(6,2)
51
+ sage: g = graphs.SymplecticPolarGraph(6, 2)
52
52
sage: g.is_strongly_regular(parameters=True)
53
53
(63, 30, 13, 15)
54
54
sage: set(g.spectrum()) == {-5, 3, 30} # needs sage.rings.number_field
@@ -57,28 +57,18 @@ def SymplecticPolarGraph(d, q, algorithm=None):
57
57
The parameters of `Sp(4,q)` are the same as of `O(5,q)`, but they are
58
58
not isomorphic if `q` is odd::
59
59
60
- sage: G = graphs.SymplecticPolarGraph(4,3)
60
+ sage: G = graphs.SymplecticPolarGraph(4, 3)
61
61
sage: G.is_strongly_regular(parameters=True)
62
62
(40, 12, 2, 4)
63
- sage: O = graphs.OrthogonalPolarGraph(5,3) # needs sage.libs.gap
64
- sage: O.is_strongly_regular(parameters=True) # optional - EXPECTED
63
+
64
+ sage: # needs sage.libs.gap
65
+ sage: O = graphs.OrthogonalPolarGraph(5, 3)
66
+ sage: O.is_strongly_regular(parameters=True)
65
67
(40, 12, 2, 4)
66
- sage: O.is_strongly_regular(parameters=True) # optional - GOT (with --distribution 'sagemath-graphs[modules]')
67
- Traceback (most recent call last):
68
- ...
69
- File "<doctest...>", line 1, in <module>
70
- O.is_strongly_regular(parameters=True)
71
- AttributeError: 'function' object has no attribute 'is_strongly_regular'
72
- sage: O.is_isomorphic(G) # optional - EXPECTED
68
+ sage: O.is_isomorphic(G)
73
69
False
74
- sage: O.is_isomorphic(G) # optional - GOT (with --distribution 'sagemath-graphs[modules]')
75
- Traceback (most recent call last):
76
- ...
77
- File "<doctest...>", line 1, in <module>
78
- O.is_isomorphic(G)
79
- AttributeError: 'function' object has no attribute 'is_isomorphic'
80
- sage: S = graphs.SymplecticPolarGraph(6,4,algorithm="gap") # not tested (long time), needs sage.libs.gap
81
- sage: S.is_strongly_regular(parameters=True) # not tested (long time), needs sage.libs.gap
70
+ sage: S = graphs.SymplecticPolarGraph(6, 4, algorithm="gap") # not tested (long time)
71
+ sage: S.is_strongly_regular(parameters=True) # not tested (long time)
82
72
(1365, 340, 83, 85)
83
73
84
74
TESTS::
@@ -160,30 +150,32 @@ def AffineOrthogonalPolarGraph(d, q, sign="+"):
160
150
`VO^-(4,3)`::
161
151
162
152
sage: g = graphs.AffineOrthogonalPolarGraph(4,3,"-") # needs sage.libs.gap
163
- sage: g.is_isomorphic(graphs.BrouwerHaemersGraph()) # optional - NameError: 'g' (with --distribution 'sagemath-graphs[modules]')
153
+ sage: g.is_isomorphic(graphs.BrouwerHaemersGraph()) # needs sage.libs.gap
164
154
True
165
155
166
156
Some examples from `Brouwer's table or strongly regular graphs
167
157
<https://www.win.tue.nl/~aeb/graphs/srg/srgtab.html>`_::
168
158
169
- sage: g = graphs.AffineOrthogonalPolarGraph(6,2,"-"); g # needs sage.libs.gap
159
+ sage: # needs sage.libs.gap
160
+ sage: g = graphs.AffineOrthogonalPolarGraph(6,2,"-"); g
170
161
Affine Polar Graph VO^-(6,2): Graph on 64 vertices
171
- sage: g.is_strongly_regular(parameters=True) # optional - NameError: 'g' (with --distribution 'sagemath-graphs[modules]')
162
+ sage: g.is_strongly_regular(parameters=True)
172
163
(64, 27, 10, 12)
173
- sage: g = graphs.AffineOrthogonalPolarGraph(6,2,"+"); g # needs sage.libs.gap
164
+ sage: g = graphs.AffineOrthogonalPolarGraph(6,2,"+"); g
174
165
Affine Polar Graph VO^+(6,2): Graph on 64 vertices
175
- sage: g.is_strongly_regular(parameters=True) # optional - NameError: 'g' (with --distribution 'sagemath-graphs[modules]')
166
+ sage: g.is_strongly_regular(parameters=True)
176
167
(64, 35, 18, 20)
177
168
178
169
When ``sign is None``::
179
170
180
- sage: g = graphs.AffineOrthogonalPolarGraph(5,2,None); g # needs sage.libs.gap
171
+ sage: # needs sage.libs.gap
172
+ sage: g = graphs.AffineOrthogonalPolarGraph(5,2,None); g
181
173
Affine Polar Graph VO^-(5,2): Graph on 32 vertices
182
- sage: g.is_strongly_regular(parameters=True) # optional - NameError: 'g' (with --distribution 'sagemath-graphs[modules]')
174
+ sage: g.is_strongly_regular(parameters=True)
183
175
False
184
- sage: g.is_regular() # optional - NameError: 'g' (with --distribution 'sagemath-graphs[modules]')
176
+ sage: g.is_regular()
185
177
True
186
- sage: g.is_vertex_transitive() # optional - NameError: 'g' (with --distribution 'sagemath-graphs[modules]')
178
+ sage: g.is_vertex_transitive()
187
179
True
188
180
"""
189
181
if sign in ["+" , "-" ]:
@@ -275,7 +267,7 @@ def _orthogonal_polar_graph(m, q, sign="+", point_type=[0]):
275
267
`NO^{-,\perp}(5,5)`::
276
268
277
269
sage: g = _orthogonal_polar_graph(5,5,point_type=[2,3]) # long time, needs sage.libs.gap
278
- sage: g.is_strongly_regular(parameters=True) # long time, needs sage.libs.gap
270
+ sage: g.is_strongly_regular(parameters=True) # long time # needs sage.libs.gap
279
271
(300, 65, 10, 15)
280
272
281
273
`NO^{+,\perp}(5,5)`::
@@ -465,11 +457,12 @@ def NonisotropicOrthogonalPolarGraph(m, q, sign="+", perp=None):
465
457
466
458
Wilbrink's graphs::
467
459
468
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(5,4,'+') # needs sage.libs.gap
469
- sage: g.is_strongly_regular(parameters=True) # needs sage.libs.gap
460
+ sage: # needs sage.libs.gap
461
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(5,4,'+')
462
+ sage: g.is_strongly_regular(parameters=True)
470
463
(136, 75, 42, 40)
471
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(5,4,'-') # needs sage.libs.gap
472
- sage: g.is_strongly_regular(parameters=True) # needs sage.libs.gap
464
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(5,4,'-')
465
+ sage: g.is_strongly_regular(parameters=True)
473
466
(120, 51, 18, 24)
474
467
sage: g = graphs.NonisotropicOrthogonalPolarGraph(7,4,'+'); g # not tested (long time)
475
468
NO^+(7, 4): Graph on 2080 vertices
@@ -478,27 +471,28 @@ def NonisotropicOrthogonalPolarGraph(m, q, sign="+", perp=None):
478
471
479
472
TESTS::
480
473
481
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(4,2); g # needs sage.libs.gap
474
+ sage: # needs sage.libs.gap
475
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(4,2); g
482
476
NO^+(4, 2): Graph on 6 vertices
483
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(4,3,'-') # needs sage.libs.gap
484
- sage: g.is_strongly_regular(parameters=True) # needs sage.libs.gap
477
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(4,3,'-')
478
+ sage: g.is_strongly_regular(parameters=True)
485
479
(15, 6, 1, 3)
486
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(3,5,'-',perp=1); g # needs sage.libs.gap
480
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(3,5,'-',perp=1); g
487
481
NO^-,perp(3, 5): Graph on 10 vertices
488
- sage: g.is_strongly_regular(parameters=True) # needs sage.libs.gap
482
+ sage: g.is_strongly_regular(parameters=True)
489
483
(10, 3, 0, 1)
490
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(6,3,'+') # long time, needs sage.libs.gap
491
- sage: g.is_strongly_regular(parameters=True) # long time, needs sage.libs.gap
484
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(6,3,'+') # long time
485
+ sage: g.is_strongly_regular(parameters=True) # long time
492
486
(117, 36, 15, 9)
493
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(6,3,'-'); g # long time, needs sage.libs.gap
487
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(6,3,'-'); g # long time
494
488
NO^-(6, 3): Graph on 126 vertices
495
- sage: g.is_strongly_regular(parameters=True) # long time, needs sage.libs.gap
489
+ sage: g.is_strongly_regular(parameters=True) # long time
496
490
(126, 45, 12, 18)
497
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(5,5,'-') # long time, needs sage.libs.gap
498
- sage: g.is_strongly_regular(parameters=True) # long time, needs sage.libs.gap
491
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(5,5,'-') # long time
492
+ sage: g.is_strongly_regular(parameters=True) # long time
499
493
(300, 104, 28, 40)
500
- sage: g = graphs.NonisotropicOrthogonalPolarGraph(5,5,'+') # long time, needs sage.libs.gap
501
- sage: g.is_strongly_regular(parameters=True) # long time, needs sage.libs.gap
494
+ sage: g = graphs.NonisotropicOrthogonalPolarGraph(5,5,'+') # long time
495
+ sage: g.is_strongly_regular(parameters=True) # long time
502
496
(325, 144, 68, 60)
503
497
sage: g = graphs.NonisotropicOrthogonalPolarGraph(6,4,'+')
504
498
Traceback (most recent call last):
@@ -581,7 +575,7 @@ def _polar_graph(m, q, g, intersection_size=None):
581
575
TESTS::
582
576
583
577
sage: from sage.graphs.generators.classical_geometries import _polar_graph
584
- sage: _polar_graph(4, 4, libgap.GeneralUnitaryGroup(4, 2)) # needs sage.libs.gap
578
+ sage: _polar_graph(4, 4, libgap.GeneralUnitaryGroup(4, 2)) # needs sage.libs.gap
585
579
Graph on 45 vertices
586
580
sage: _polar_graph(4, 4, libgap.GeneralUnitaryGroup(4, 2), intersection_size=1) # needs sage.libs.gap
587
581
Graph on 27 vertices
@@ -759,9 +753,9 @@ def UnitaryDualPolarGraph(m, q):
759
753
The point graph of a generalized quadrangle (see
760
754
:wikipedia:`Generalized_quadrangle`, [PT2009]_) of order (8,4)::
761
755
762
- sage: G = graphs.UnitaryDualPolarGraph(5,2); G # long time, needs sage.libs.gap
756
+ sage: G = graphs.UnitaryDualPolarGraph(5,2); G # long time # needs sage.libs.gap
763
757
Unitary Dual Polar Graph DU(5, 2); GQ(8, 4): Graph on 297 vertices
764
- sage: G.is_strongly_regular(parameters=True) # long time, needs sage.libs.gap
758
+ sage: G.is_strongly_regular(parameters=True) # long time # needs sage.libs.gap
765
759
(297, 40, 7, 5)
766
760
767
761
Another way to get the generalized quadrangle of order (2,4)::
@@ -865,22 +859,24 @@ def TaylorTwographDescendantSRG(q, clique_partition=False):
865
859
866
860
EXAMPLES::
867
861
868
- sage: g = graphs.TaylorTwographDescendantSRG(3); g # needs sage.rings.finite_rings
862
+ sage: # needs sage.rings.finite_rings
863
+ sage: g = graphs.TaylorTwographDescendantSRG(3); g
869
864
Taylor two-graph descendant SRG: Graph on 27 vertices
870
- sage: g.is_strongly_regular(parameters=True) # needs sage.rings.finite_rings
865
+ sage: g.is_strongly_regular(parameters=True)
871
866
(27, 10, 1, 5)
872
867
sage: from sage.combinat.designs.twographs import taylor_twograph
873
- sage: T = taylor_twograph(3) # long time, needs sage.rings.finite_rings
874
- sage: g.is_isomorphic(T.descendant(T.ground_set()[1])) # long time, needs sage.rings.finite_rings
868
+ sage: T = taylor_twograph(3) # long time
869
+ sage: g.is_isomorphic(T.descendant(T.ground_set()[1])) # long time
875
870
True
876
871
sage: g = graphs.TaylorTwographDescendantSRG(5) # not tested (long time)
877
872
sage: g.is_strongly_regular(parameters=True) # not tested (long time)
878
873
(125, 52, 15, 26)
879
874
880
875
TESTS::
881
876
882
- sage: g,l,_ = graphs.TaylorTwographDescendantSRG(3, clique_partition=True) # needs sage.rings.finite_rings
883
- sage: all(g.is_clique(x) for x in l) # needs sage.rings.finite_rings
877
+ sage: # needs sage.rings.finite_rings
878
+ sage: g,l,_ = graphs.TaylorTwographDescendantSRG(3, clique_partition=True)
879
+ sage: all(g.is_clique(x) for x in l)
884
880
True
885
881
sage: graphs.TaylorTwographDescendantSRG(4)
886
882
Traceback (most recent call last):
@@ -1069,14 +1065,15 @@ def T2starGeneralizedQuadrangleGraph(q, dual=False, hyperoval=None, field=None,
1069
1065
1070
1066
TESTS::
1071
1067
1072
- sage: F = GF(4,'b') # repeating a point... # needs sage.libs.pari
1073
- sage: O = [vector(F,(0,1,0,0)),vector(F,(0,0,1,0))]+[vector(F, (0,1,x^2,x)) for x in F] # needs sage.rings.finite_rings
1074
- sage: graphs.T2starGeneralizedQuadrangleGraph(4, hyperoval=O, field=F) # needs sage.rings.finite_rings
1068
+ sage: # needs sage.rings.finite_rings
1069
+ sage: F = GF(4,'b') # repeating a point...
1070
+ sage: O = [vector(F,(0,1,0,0)),vector(F,(0,0,1,0))]+[vector(F, (0,1,x^2,x)) for x in F]
1071
+ sage: graphs.T2starGeneralizedQuadrangleGraph(4, hyperoval=O, field=F)
1075
1072
Traceback (most recent call last):
1076
1073
...
1077
1074
RuntimeError: incorrect hyperoval size
1078
- sage: O = [vector(F,(0,1,1,0)),vector(F,(0,0,1,0))]+[vector(F, (0,1,x^2,x)) for x in F] # needs sage.rings.finite_rings
1079
- sage: graphs.T2starGeneralizedQuadrangleGraph(4, hyperoval=O, field=F) # needs sage.rings.finite_rings
1075
+ sage: O = [vector(F,(0,1,1,0)),vector(F,(0,0,1,0))]+[vector(F, (0,1,x^2,x)) for x in F]
1076
+ sage: graphs.T2starGeneralizedQuadrangleGraph(4, hyperoval=O, field=F)
1080
1077
Traceback (most recent call last):
1081
1078
...
1082
1079
RuntimeError: incorrect hyperoval
@@ -1183,21 +1180,21 @@ def HaemersGraph(q, hyperoval=None, hyperoval_matching=None, field=None, check_h
1183
1180
TESTS::
1184
1181
1185
1182
sage: # needs sage.rings.finite_rings
1186
- sage: F= GF(4,'b') # repeating a point...
1187
- sage: O= [vector(F,(0,1,0,0)),vector(F,(0,0,1,0))]+[vector(F, (0,1,x^2,x)) for x in F]
1183
+ sage: F = GF(4,'b') # repeating a point...
1184
+ sage: O = [vector(F,(0,1,0,0)),vector(F,(0,0,1,0))]+[vector(F, (0,1,x^2,x)) for x in F]
1188
1185
sage: graphs.HaemersGraph(4, hyperoval=O, field=F)
1189
1186
Traceback (most recent call last):
1190
1187
...
1191
1188
RuntimeError: incorrect hyperoval size
1192
- sage: O= [vector(F,(0,1,1,0)),vector(F,(0,0,1,0))]+[vector(F, (0,1,x^2,x)) for x in F]
1189
+ sage: O = [vector(F,(0,1,1,0)),vector(F,(0,0,1,0))]+[vector(F, (0,1,x^2,x)) for x in F]
1193
1190
sage: graphs.HaemersGraph(4, hyperoval=O, field=F)
1194
1191
Traceback (most recent call last):
1195
1192
...
1196
1193
RuntimeError: incorrect hyperoval
1197
1194
1198
- sage: g = graphs.HaemersGraph(8); g # not tested (long time), needs sage.rings.finite_rings
1195
+ sage: g = graphs.HaemersGraph(8); g # not tested (long time) # needs sage.rings.finite_rings
1199
1196
Haemers(8): Graph on 640 vertices
1200
- sage: g.is_strongly_regular(parameters=True) # not tested (long time), needs sage.rings.finite_rings
1197
+ sage: g.is_strongly_regular(parameters=True) # not tested (long time) # needs sage.rings.finite_rings
1201
1198
(640, 71, 6, 8)
1202
1199
1203
1200
"""
@@ -1392,9 +1389,10 @@ def Nowhere0WordsTwoWeightCodeGraph(q, hyperoval=None, field=None, check_hyperov
1392
1389
1393
1390
using the built-in construction::
1394
1391
1395
- sage: g = graphs.Nowhere0WordsTwoWeightCodeGraph(8); g # needs sage.rings.finite_rings
1392
+ sage: # needs sage.rings.finite_rings
1393
+ sage: g = graphs.Nowhere0WordsTwoWeightCodeGraph(8); g
1396
1394
Nowhere0WordsTwoWeightCodeGraph(8): Graph on 196 vertices
1397
- sage: g.is_strongly_regular(parameters=True) # needs sage.rings.finite_rings
1395
+ sage: g.is_strongly_regular(parameters=True)
1398
1396
(196, 60, 14, 20)
1399
1397
sage: g = graphs.Nowhere0WordsTwoWeightCodeGraph(16) # not tested (long time)
1400
1398
sage: g.is_strongly_regular(parameters=True) # not tested (long time)
@@ -1413,14 +1411,15 @@ def Nowhere0WordsTwoWeightCodeGraph(q, hyperoval=None, field=None, check_hyperov
1413
1411
1414
1412
TESTS::
1415
1413
1416
- sage: F = GF(8) # repeating a point... # needs sage.rings.finite_rings
1417
- sage: O = [vector(F,(1,0,0)),vector(F,(0,1,0))]+[vector(F, (1,x^2,x)) for x in F] # needs sage.rings.finite_rings
1418
- sage: graphs.Nowhere0WordsTwoWeightCodeGraph(8,hyperoval=O,field=F) # needs sage.rings.finite_rings
1414
+ sage: # needs sage.rings.finite_rings
1415
+ sage: F = GF(8) # repeating a point...
1416
+ sage: O = [vector(F,(1,0,0)),vector(F,(0,1,0))]+[vector(F, (1,x^2,x)) for x in F]
1417
+ sage: graphs.Nowhere0WordsTwoWeightCodeGraph(8,hyperoval=O,field=F)
1419
1418
Traceback (most recent call last):
1420
1419
...
1421
1420
RuntimeError: incorrect hyperoval size
1422
- sage: O = [vector(F,(1,1,0)),vector(F,(0,1,0))]+[vector(F, (1,x^2,x)) for x in F] # needs sage.rings.finite_rings
1423
- sage: graphs.Nowhere0WordsTwoWeightCodeGraph(8,hyperoval=O,field=F) # optional - NameError: 'F' (with --distribution 'sagemath-graphs[modules]')
1421
+ sage: O = [vector(F,(1,1,0)),vector(F,(0,1,0))]+[vector(F, (1,x^2,x)) for x in F]
1422
+ sage: graphs.Nowhere0WordsTwoWeightCodeGraph(8,hyperoval=O,field=F)
1424
1423
Traceback (most recent call last):
1425
1424
...
1426
1425
RuntimeError: incorrect hyperoval
0 commit comments