Generators - Small
==================

>>> from networkx import *

>>> from networkx.isomorph import graph_could_be_isomorphic
>>> is_isomorphic=graph_could_be_isomorphic

Some small graphs
-----------------

>>> null=null_graph()


Test make_small_graph
---------------------

>>> d=["adjacencylist","Bull Graph",5,[[2,3],[1,3,4],[1,2,5],[2],[3]]]
>>> G=make_small_graph(d)
>>> is_isomorphic(G, bull_graph())
True

Test LCF_graph(n, shift_list, repeats)
--------------------------------------


If n<=0, then return the null_graph

>>> G=LCF_graph(-10,[1,2],100)
>>> is_isomorphic(G,null)
True
>>> G=LCF_graph(0,[1,2],3)
>>> is_isomorphic(G,null)
True
>>> G=LCF_graph(0,[1,2],10)
>>> is_isomorphic(G,null)
True


Test that LCF(n,[],0) == cycle_graph(n)

>>> G=LCF_graph(5,[],0)
>>> is_isomorphic(G,cycle_graph(5))
True
>>> G=LCF_graph(10,[],0)
>>> is_isomorphic(G,cycle_graph(10))
True
>>> G=LCF_graph(5,[],1)
>>> is_isomorphic(G,cycle_graph(5))
True
>>> G=LCF_graph(10,[],10)
>>> is_isomorphic(G,cycle_graph(10))
True

Generate the utility graph K_{3,3}

>>> G=LCF_graph(6,[3,-3],3)
>>> utility_graph=complete_bipartite_graph(3,3)
>>> is_isomorphic(G, utility_graph)
True


Test properties of named small graphs
-------------------------------------

>>> G=bull_graph()
>>> G.number_of_nodes() 
5
>>> G.number_of_edges() 
5
>>> G.degree()
[2, 3, 3, 1, 1]
>>> diameter(G)
3
>>> radius(G)
2

>>> G=chvatal_graph()
>>> G.number_of_nodes() 
12
>>> G.number_of_edges() 
24
>>> G.degree()==12*[4]
True
>>> diameter(G)
2
>>> radius(G)
2

>>> G=cubical_graph()
>>> G.number_of_nodes() 
8
>>> G.number_of_edges() 
12
>>> G.degree()==8*[3]
True
>>> diameter(G)
3
>>> radius(G)
3

>>> G=desargues_graph()
>>> G.number_of_nodes()
20
>>> 
G.number_of_edges()
30
>>> G.degree()== 20*[3]
True

>>> G=diamond_graph()
>>> G.number_of_nodes()  
4
>>> G.degree()
[2, 3, 3, 2]
>>> diameter(G) 
2
>>> radius(G) 
1

>>> G=dodecahedral_graph()
>>> G.number_of_nodes()  
20
>>> G.number_of_edges()  
30
>>> G.degree()==20*[3]  
True
>>> diameter(G) 
5
>>> radius(G) 
5

>>> G=frucht_graph()
>>> G.number_of_nodes()  
12
>>> G.number_of_edges()  
18
>>> G.degree()==12*[3]  
True
>>> diameter(G) 
4
>>> radius(G) 
3

>>> G=heawood_graph()
>>> G.number_of_nodes()  
14
>>> G.number_of_edges()  
21
>>> G.degree()==14*[3]  
True
>>> diameter(G) 
3
>>> radius(G) 
3


>>> G=house_graph()
>>> G.number_of_nodes()  
5
>>> G.number_of_edges()  
6
>>> G.degree()
[2, 2, 3, 3, 2]
>>> diameter(G) 
2
>>> radius(G) 
2

>>> G=house_x_graph()
>>> G.number_of_nodes()  
5
>>> G.number_of_edges()  
8
>>> G.degree()
[3, 3, 4, 4, 2]
>>> diameter(G) 
2
>>> radius(G) 
1

>>> G=icosahedral_graph()
>>> G.number_of_nodes()  
12
>>> G.number_of_edges()  
30
>>> G.degree()
[5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
>>> diameter(G) 
3
>>> radius(G) 
3

>>> G=krackhardt_kite_graph()
>>> G.number_of_nodes()  
10
>>> G.number_of_edges()  
18
>>> G.degree()
[4, 4, 3, 6, 3, 5, 5, 3, 2, 1]

>>> G=moebius_kantor_graph()
>>> G.number_of_nodes()  
16
>>> G.number_of_edges()  
24
>>> G.degree()==16*[3]
True
>>> diameter(G) 
4

>>> G=octahedral_graph()
>>> G.number_of_nodes()  
6
>>> G.number_of_edges()  
12
>>> G.degree()==6*[4]
True
>>> diameter(G) 
2
>>> radius(G) 
2

>>> G=pappus_graph()
>>> G.number_of_nodes()  
18
>>> G.number_of_edges()  
27
>>> G.degree()==18*[3]
True
>>> diameter(G) 
4


>>> G=petersen_graph()
>>> G.number_of_nodes()  
10
>>> G.number_of_edges()  
15
>>> G.degree()==10*[3]
True
>>> diameter(G) 
2
>>> radius(G) 
2

>>> G=sedgewick_maze_graph()
>>> G.number_of_nodes()  
8
>>> G.number_of_edges()  
10
>>> G.degree()
[3, 1, 2, 2, 4, 3, 2, 3]

>>> G=tetrahedral_graph()
>>> G.number_of_nodes()  
4
>>> G.number_of_edges()  
6
>>> G.degree()
[3, 3, 3, 3]
>>> diameter(G) 
1
>>> radius(G) 
1

>>> G=truncated_cube_graph()
>>> G.number_of_nodes()  
24
>>> G.number_of_edges()  
36
>>> G.degree()==24*[3]
True


>>> G=truncated_tetrahedron_graph()
>>> G.number_of_nodes()  
12
>>> G.number_of_edges()  
18
>>> G.degree()==12*[3]
True



>>> G=tutte_graph()
>>> G.number_of_nodes()  
46
>>> G.number_of_edges()  
69
>>> G.degree()==46*[3]
True
