commented a little more

git-svn-id: svn://anubis/gvsu@136 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-08-30 16:35:18 +00:00
parent f9633e53f3
commit 2b36f9369c

View File

@ -1,4 +1,12 @@
/*
* Josh Holtrop
* 2008-08-30
* Grand Valley State University
* CS677
* Programming Assignment #1
*/
#include <iostream>
#include <fstream>
#include <string>
@ -28,10 +36,9 @@ class Path
vector<string> node_list;
map<string, bool> visited_nodes;
Path()
{
cost = 0;
}
/* Default constructor */
Path() { cost = 0; }
/* Construct a Path from another one, appending a new node from t */
Path(const Path & orig, const Transition & t)
{
cost = orig.cost + t.cost;
@ -98,7 +105,7 @@ int main(int argc, char * argv[])
string goalNode;
Transition_Table_t node_transitions;
// Read the input file
/* Read the input file */
i >> startNode;
i >> goalNode;
while (!i.eof())
@ -110,6 +117,7 @@ int main(int argc, char * argv[])
}
i.close();
/* Once the input is read, try to find a path */
solveMinEnergy(startNode, goalNode, node_transitions);
return 0;