# Ticket #6813: 6813-worldmap.patch

File 6813-worldmap.patch, 2.4 KB (added by awebb, 10 years ago)

applies to sage-4.1.2.rc0

• ## sage/graphs/graph_generators.py

```# HG changeset patch
# User Nathann Cohen <nathann.cohen@gmail.com>
# Date 1251016915 -7200
# Node ID e84009a8522621af07009435934aa4435428e03e
# Parent  5398e0ca857cda43508e4c1d2f6ff92724b35c32
Trac # 6813 :Function WorldMap

diff -r 5398e0ca857c -r e84009a85226 sage/graphs/graph_generators.py```
 a - DegreeSequenceConfigurationModel - DegreeSequenceTree - DegreeSequenceExpected Oddities : - WorldMap AUTHORS: - Robert Miller (2007-10-24): Isomorph free exhaustive generation - Nathann Cohen (2009-08-12): WorldMap - Michael Yurko (2009-9-01): added hyperstar, (n,k)-star, n-star, and bubblesort graphs """ - DegreeSequenceConfigurationModel - DegreeSequenceTree - DegreeSequenceExpected Oddities : - WorldMap ORDERLY GENERATION: graphs(vertices, property=lambda x: True, augment='edges', size=None) import networkx return graph.Graph(networkx.random_shell_graph(constructor, seed)) def WorldMap(self): """ Returns the Graph of all the countries, in which two countries are adjacent in the graph if they have a common boundary. This graph has been built from the data available in The CIA World Factbook [1] (2009-08-21). The returned graph ``G`` has a member ``G.gps_coordinates`` equal to a dictionary containing the GPS coordinates of each country's capital city. EXAMPLE:: sage: g=graphs.WorldMap() sage: g.has_edge("France","Italy") True REFERENCE: .. [1] CIA Factbook 09 https://www.cia.gov/library/publications/the-world-factbook/ """ from sage.structure.sage_object import load from sage.misc.misc import SAGE_DATA return load(SAGE_DATA+"graphs/graph_world.sobj") ################################################################################ #   Graphs with a given degree sequence ################################################################################