public
Description: An application to find shortest paths in a graph specified by input file. A project for academic purposes. Created for the Algorithms and Data Structures laboratory classes.
Clone URL: git://github.com/pptaszynski/aisdi-graf.git
Added Path class to store in priority queue for dijkstra's alg.
pptaszynski (author)
Wed Jun 11 17:11:47 -0700 2008
commit  292d41c82992ad9d9654954abbbf00dc91f1e5dd
tree    13a5b06e7f0fb9a2627e9fc1146ef9752f0f0548
parent  131ba7e69e8eece11c802242d39829553df6dd78
0
...
68
69
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
72
73
...
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
0
@@ -68,6 +68,27 @@ public:
0
 }
0
 
0
 /**
0
+ * class for a priority queue for searching weighted shortest-path algorithm
0
+ *
0
+ */
0
+class Path
0
+{
0
+public:
0
+ Vertex *to;
0
+ double cost;
0
+
0
+ Path(Vertex* t = 0, double c = 0.0) : to(t), cost(c) { }
0
+
0
+ bool operator>(const Path& other) const {
0
+ return cost > other.cost;
0
+ }
0
+
0
+ bool operator<(const Path& other) const {
0
+ return cost < other.cost;
0
+ }
0
+}
0
+
0
+/**
0
  * Graph class
0
  *
0
  * @constructor  no parameteres

Comments

    No one has commented yet.