@@ -1418,15 +1418,16 @@ def GeneralisedOctagonGraph(const int s, const int t):
1418
1418
1419
1419
EXAMPLES::
1420
1420
1421
- sage: G = graphs. GeneralisedOctagonGraph( 1, 4) # needs sage. libs. gap
1422
- sage: G. is_distance_regular( True) # needs sage. libs. gap
1423
- ( [5, 4, 4, 4, None ], [None, 1, 1, 1, 5 ])
1424
- sage: G = graphs. GeneralisedOctagonGraph( 2, 4) # optional - gap_packages internet
1425
- sage: G. is_distance_regular( True) # optional - gap_packages internet
1426
- ( [10, 8, 8, 8, None ], [None, 1, 1, 1, 5 ])
1427
- sage: G = graphs. GeneralisedOctagonGraph( 5, 1) # needs sage. libs. gap
1428
- sage: G. is_distance_regular( True) # needs sage. libs. gap
1429
- ( [10, 5, 5, 5, None ], [None, 1, 1, 1, 2 ])
1421
+ sage: # needs sage. libs. gap
1422
+ sage: G = graphs. GeneralisedOctagonGraph( 1, 4)
1423
+ sage: G. is_distance_regular( True)
1424
+ ( [5, 4, 4, 4, None ], [None, 1, 1, 1, 5 ])
1425
+ sage: G = graphs. GeneralisedOctagonGraph( 2, 4) # optional - gap_packages internet
1426
+ sage: G. is_distance_regular( True) # optional - gap_packages internet
1427
+ ( [10, 8, 8, 8, None ], [None, 1, 1, 1, 5 ])
1428
+ sage: G = graphs. GeneralisedOctagonGraph( 5, 1)
1429
+ sage: G. is_distance_regular( True)
1430
+ ( [10, 5, 5, 5, None ], [None, 1, 1, 1, 2 ])
1430
1431
1431
1432
.. NOTE::
1432
1433
@@ -1528,13 +1529,14 @@ def GeneralisedHexagonGraph(const int s, const int t):
1528
1529
1529
1530
EXAMPLES::
1530
1531
1532
+ sage: # needs sage. libs. gap
1531
1533
sage: G = graphs. GeneralisedHexagonGraph( 5, 5) # optional - gap_packages internet
1532
1534
sage: G. is_distance_regular( True) # optional - gap_packages internet
1533
1535
( [30, 25, 25, None ], [None, 1, 1, 6 ])
1534
- sage: G = graphs. GeneralisedHexagonGraph( 7, 1) # needs sage . libs . gap
1535
- sage: G. is_distance_regular( True) # needs sage . libs . gap
1536
+ sage: G = graphs. GeneralisedHexagonGraph( 7, 1)
1537
+ sage: G. is_distance_regular( True)
1536
1538
( [14, 7, 7, None ], [None, 1, 1, 2 ])
1537
- sage: graphs. GeneralisedHexagonGraph( 1, 1) # needs sage . libs . gap
1539
+ sage: graphs. GeneralisedHexagonGraph( 1, 1)
1538
1540
Cycle graph: Graph on 6 vertices
1539
1541
1540
1542
.. NOTE::
@@ -1752,16 +1754,17 @@ def _line_graph_generalised_polygon(H):
1752
1754
1753
1755
EXAMPLES::
1754
1756
1755
- sage: from sage. graphs. generators. distance_regular import \
1756
- .... : _line_graph_generalised_polygon
1757
- sage: G = graphs. GeneralisedHexagonGraph( 1, 8) # needs sage. libs. gap
1758
- sage: H = _line_graph_generalised_polygon( G) # needs sage. libs. gap
1759
- sage: H. is_distance_regular( True) # needs sage. libs. gap
1760
- ( [16, 8, 8, None ], [None, 1, 1, 2 ])
1761
- sage: G = graphs. GeneralisedHexagonGraph( 3, 3) # optional - gap_packages internet
1762
- sage: H = _line_graph_generalised_polygon( G) # optional - gap_packages internet
1763
- sage: G. is_isomorphic( H) # optional - gap_packages internet
1764
- True
1757
+ sage: # needs sage. libs. gap
1758
+ sage: from sage. graphs. generators. distance_regular import \
1759
+ .... : _line_graph_generalised_polygon
1760
+ sage: G = graphs. GeneralisedHexagonGraph( 1, 8)
1761
+ sage: H = _line_graph_generalised_polygon( G)
1762
+ sage: H. is_distance_regular( True)
1763
+ ( [16, 8, 8, None ], [None, 1, 1, 2 ])
1764
+ sage: G = graphs. GeneralisedHexagonGraph( 3, 3) # optional - gap_packages internet
1765
+ sage: H = _line_graph_generalised_polygon( G) # optional - gap_packages internet
1766
+ sage: G. is_isomorphic( H) # optional - gap_packages internet
1767
+ True
1765
1768
1766
1769
REFERENCES:
1767
1770
@@ -2416,19 +2419,20 @@ def is_near_polygon(array):
2416
2419
2417
2420
TESTS::
2418
2421
2422
+ sage: # needs sage. combinat sage. libs. pari
2419
2423
sage: from sage. graphs. generators. distance_regular import (
2420
2424
.... : is_near_polygon, near_polygon_graph)
2421
- sage: is_near_polygon( [7, 6, 6, 4, 4, 1, 1, 3, 3, 7 ]) # needs sage . combinat sage . libs . pari
2425
+ sage: is_near_polygon( [7, 6, 6, 4, 4, 1, 1, 3, 3, 7 ])
2422
2426
( 4, ( 2, 2))
2423
2427
sage: near_polygon_graph( 4, ( 2, 2))
2424
2428
Double Grassmann graph ( 5, 2, 2) : Graph on 310 vertices
2425
- sage: near_polygon_graph( * is_near_polygon( [3, 2, 2, 1, 1, 3 ])) # needs sage. combinat sage . rings. finite_rings
2429
+ sage: near_polygon_graph( * is_near_polygon( [3, 2, 2, 1, 1, 3 ])) # needs sage. rings. finite_rings
2426
2430
Generalised hexagon of order ( 1, 2) : Graph on 14 vertices
2427
- sage: is_near_polygon( [16, 12, 8, 4, 1, 2, 3, 4 ]) # needs sage . combinat sage . libs . pari
2431
+ sage: is_near_polygon( [16, 12, 8, 4, 1, 2, 3, 4 ])
2428
2432
( 6, ( 4, 5))
2429
- sage: is_near_polygon( []) # needs sage . combinat sage . libs . pari
2433
+ sage: is_near_polygon( [])
2430
2434
False
2431
- sage: is_near_polygon( [25, 16, 9, 4, 1, 1, 4, 9, 16, 25 ]) # JohnsonGraph # needs sage . combinat sage . libs . pari
2435
+ sage: is_near_polygon( [25, 16, 9, 4, 1, 1, 4, 9, 16, 25 ]) # JohnsonGraph
2432
2436
False
2433
2437
"""
2434
2438
from sage.arith.misc import is_prime_power
@@ -2719,21 +2723,23 @@ def distance_regular_graph(list arr, existence=False, check=True):
2719
2723
TESTS::
2720
2724
2721
2725
sage: graphs. distance_regular_graph( [3, 2, 2, 1, 1, 1, 1, 2, 2, 3 ], # needs sage. combinat
2722
- .... : existence=True)
2726
+ .... : existence=True)
2723
2727
True
2724
2728
sage: graphs. distance_regular_graph( [3, 2, 2, 1, 2, 1, 1, 2, 2, 3 ],
2725
- .... : existence=True)
2729
+ .... : existence=True)
2726
2730
False
2727
2731
sage: graphs. distance_regular_graph( [18, 16, 16, 1, 1, 9 ]) # optional - internet gap_packages
2728
2732
Generalised hexagon of order ( 2, 8) : Graph on 819 vertices
2729
- sage: graphs. distance_regular_graph( [14, 12, 10, 8, 6, 4, 2, # needs sage.combinat
2730
- ....: 1, 2, 3, 4, 5, 6, 7 ])
2733
+
2734
+ sage: # needs sage. combinat
2735
+ sage: graphs. distance_regular_graph( [14, 12, 10, 8, 6, 4, 2,
2736
+ ....: 1, 2, 3, 4, 5, 6, 7 ])
2731
2737
Hamming Graph with parameters 7,3: Graph on 2187 vertices
2732
- sage: graphs. distance_regular_graph( [66, 45, 28, 1, 6, 30 ]) # needs sage . combinat
2738
+ sage: graphs. distance_regular_graph( [66, 45, 28, 1, 6, 30 ])
2733
2739
Graph on 1024 vertices
2734
- sage: graphs. distance_regular_graph( [6,5,5,5,1,1,1,6 ]) # needs sage . combinat
2740
+ sage: graphs. distance_regular_graph( [6,5,5,5,1,1,1,6 ])
2735
2741
Generalised octagon of order ( 1, 5) : Graph on 312 vertices
2736
- sage: graphs. distance_regular_graph( [64, 60, 1, 1, 15, 64 ], check=True) # needs sage . combinat
2742
+ sage: graphs. distance_regular_graph( [64, 60, 1, 1, 15, 64 ], check=True)
2737
2743
Graph on 325 vertices
2738
2744
"""
2739
2745
from sage.misc.unknown import Unknown
0 commit comments