~ubuntu-branches/ubuntu/saucy/python-networkx/saucy

« back to all changes in this revision

Viewing changes to networkx/generators/atlas.py

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-03-02 01:06:32 UTC
  • mfrom: (1.2.1 upstream) (3.1.3 hardy)
  • Revision ID: james.westby@ubuntu.com-20080302010632-1lp6qe1orf59jl8b
* debian/control:
   + Replace python-setuptools with python-pkg-resources in the
     “Recommends:” since pkg_resources is now available in this
     separate package, thanks Matthias Klose (Closes: #468721).
* debian/copyright:
   + Use “© $years $name” instead of invalid “$name, $years” and
     “(C) $years, $name”, thanks to lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
"""
2
2
Generators for the small graph atlas.
3
3
 
 
4
 
4
5
See
5
6
"An Atlas of Graphs" by Ronald C. Read and Robin J. Wilson,
6
7
Oxford University Press, 1998.
7
8
 
 
9
Because of its size, this module is not imported by default.
 
10
 
8
11
"""
9
 
#    Copyright (C) 2004,2005 by 
 
12
#    Copyright (C) 2004,2005,2006,2007 by 
10
13
#    Aric Hagberg <hagberg@lanl.gov>
11
14
#    Dan Schult <dschult@colgate.edu>
12
15
#    Pieter Swart <swart@lanl.gov>
21
24
 
22
25
def graph_atlas_g():
23
26
    """
24
 
    Return the list [G1,G2,...,G1252] of graphs as named in the Graph Atlas.
25
 
    G1,...,G1252 are all graphs with up to 7 nodes.
 
27
    Return the list [G0,G1,...,G1252] of graphs as named in the Graph Atlas.
 
28
    G0,G1,...,G1252 are all graphs with up to 7 nodes.
26
29
 
27
30
    The graphs are listed:
28
31
      1. in increasing order of number of nodes;
36
39
    Note that indexing is set up so that for
37
40
    GAG=graph_atlas_g(), then
38
41
    G123=GAG[123] and G[0]=empty_graph(0)
 
42
 
39
43
    """
40
44
 
41
45
    descr_list=[
1720
1724
      7,
1721
1725
      [[1, 2], [2, 3], [3, 4], [4, 5], [1, 5], [4, 1], [6, 3], [6, 1], [6, 2]]],
1722
1726
     ['edgelist',
1723
 
      'G467',
 
1727
      'G470',
1724
1728
      7,
1725
1729
      [[1, 2], [2, 3], [3, 4], [4, 5], [5, 6], [1, 6], [1, 4], [5, 3], [6, 3]]],
1726
1730
     ['edgelist',