lab_graphs
Gangnam-Style Graphs
|
Contains code to test the functions in GraphTools. More...
#include <algorithm>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include "graph.h"
#include "premade_graphs.cpp"
#include "graph_tools.h"
Functions | |
void | error (string programName) |
Show how to use the GraphTools tester. More... | |
void | testMinWeight (Graph *graph, string fileName) |
Tests GraphTools::findMinWeight. More... | |
void | testShortestPath (Graph *graph, Vertex start, Vertex end, string fileName) |
Tests GraphTools::findShortestPath. More... | |
void | testKruskal (Graph *graph, string fileName) |
Tests GraphTools::findMST. More... | |
int | main (int argc, char *argv[]) |
Parses command line arguments and runs the appropriate test. More... | |
Contains code to test the functions in GraphTools.
Written for CS 225 Spring 2011
Updated Spring 2012
void error | ( | string | programName | ) |
Show how to use the GraphTools tester.
programName | - the name to display in the usage text |
Tests GraphTools::findMinWeight.
graph | - the graph to run the test on |
fileName- | the prefix for the filename to save the graph |
Tests GraphTools::findShortestPath.
graph | - the graph to run the test on |
start | - the vertex to find a path from |
end | - the vertex to find a path to |
fileName- | the prefix for the filename to save the graph |
Tests GraphTools::findMST.
graph | - the graph to run the test on |
fileName- | the prefix for the filename to save the graph |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Parses command line arguments and runs the appropriate test.