lab_graphs
Gangnam-Style Graphs
PremadeGraphs Namespace Reference

This namespace contains code that builds three example graphs with the Graph library. More...

Functions

Graph createUSMap (bool isWeighted)
 Creates a map of some US cities. More...
 
Graph createEuropeMap (bool isWeighted)
 Creates a map of some European cities. More...
 
Graph createJapanMap (bool isWeighted)
 Creates a map of some Japanese cities. More...
 

Detailed Description

This namespace contains code that builds three example graphs with the Graph library.

The examples have real weights between cities in miles. Unfortunately, graphviz draws the nodes with a best-fit algorithm, so relative locations of cities are wrong.

Function Documentation

Graph PremadeGraphs::createUSMap ( bool  isWeighted)

Creates a map of some US cities.

Parameters
isWeighted- whether to show distance between cities in miles.
Returns
the graph of a few cities in the United States
Graph PremadeGraphs::createEuropeMap ( bool  isWeighted)

Creates a map of some European cities.

Parameters
isWeighted- whether to show distance between cities in miles.
Returns
the graph of a few cities in Europe
Graph PremadeGraphs::createJapanMap ( bool  isWeighted)

Creates a map of some Japanese cities.

Parameters
isWeighted- whether to show distance between cities in miles.
Returns
the graph of a few cities in Japan