From 2b36f9369c6ef1967dc77ac2836fc0e64ef4f38c Mon Sep 17 00:00:00 2001 From: josh Date: Sat, 30 Aug 2008 16:35:18 +0000 Subject: [PATCH] commented a little more git-svn-id: svn://anubis/gvsu@136 45c1a28c-8058-47b2-ae61-ca45b979098e --- cs677/hw1/minimum-energy.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/cs677/hw1/minimum-energy.cc b/cs677/hw1/minimum-energy.cc index 7fceef4..527e8f3 100644 --- a/cs677/hw1/minimum-energy.cc +++ b/cs677/hw1/minimum-energy.cc @@ -1,4 +1,12 @@ +/* + * Josh Holtrop + * 2008-08-30 + * Grand Valley State University + * CS677 + * Programming Assignment #1 + */ + #include #include #include @@ -28,10 +36,9 @@ class Path vector node_list; map 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;