lab_graphs
Gangnam-Style Graphs
|
This namespace contains code that builds three example graphs with the Graph library. More...
Functions | |
Vertex | getStartVertex (string mapType) |
Returns a starting vertex for a path algorithm. More... | |
Vertex | getEndVertex (string mapType) |
Returns a ending vertex for a path algorithm. More... | |
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... | |
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.
Vertex PremadeGraphs::getStartVertex | ( | string | mapType | ) |
Returns a starting vertex for a path algorithm.
mapType | - determines which map to get a starting vertex from. Possible values are "us", "europe", and "japan" |
Vertex PremadeGraphs::getEndVertex | ( | string | mapType | ) |
Returns a ending vertex for a path algorithm.
mapType | - determines which map to get a ending vertex from. Possible values are "us", "europe", and "japan" |
Graph PremadeGraphs::createUSMap | ( | bool | isWeighted | ) |
Creates a map of some US cities.
isWeighted | - whether to show distance between cities in miles. |
Graph PremadeGraphs::createEuropeMap | ( | bool | isWeighted | ) |
Creates a map of some European cities.
isWeighted | - whether to show distance between cities in miles. |
Graph PremadeGraphs::createJapanMap | ( | bool | isWeighted | ) |
Creates a map of some Japanese cities.
isWeighted | - whether to show distance between cities in miles. |