V3 Djikstras algorithm Find reachable vertices (origid=X) returns weight=0 instead of weight=count of hops
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OQGRAPH |
Fix Committed
|
Undecided
|
OQgraph developers |
Bug Description
As per http://
Dijkstra's shortest path algorithm (latch=1)
Find reachable vertices:
SELECT * FROM foo WHERE latch = 1 AND origid = 1;
Results:
latch, origid, destid are same as input.
vertex id in linkid column.
aggregate of weights in weight column.
INSERT INTO graph_base(from_id, to_id) VALUES (1,2), (2,1);
INSERT INTO graph_base(from_id, to_id) VALUES (1,3), (3,1);
INSERT INTO graph_base(from_id, to_id) VALUES (3,4), (4,3);
INSERT INTO graph_base(from_id, to_id) VALUES (5,6), (6,5);
SELECT * FROM graph WHERE latch='dijkstras' AND origid=1;
latch origid destid weight seq linkid
dijkstras 1 NULL 0 4 4
dijkstras 1 NULL 0 3 3
dijkstras 1 NULL 0 2 2
dijkstras 1 NULL 0 1 1
weight is incorrct, should be 2 1 1 0
Related branches
- Maria-captains: Pending requested
Changed in oqgraph: | |
assignee: | nobody → OQgraph developers (oqgraph-dev) |
Found a typo:
=== modified file 'storage/ oqgraph/ graphcore. cc' oqgraph/ graphcore. cc 2013-06-29 13:57:17 +0000 oqgraph/ graphcore. cc 2013-08-09 11:20:16 +0000
EdgeWeight( ),
make_ dijkstra_ visitor(
make_oqgraph_ visit_dist( make_assoc_ property_ map(p), d, make_assoc_ property_ map(p), make_assoc_ property_ map(d),
static_ cast<stack_ cursor* >(cursor)
)
--- storage/
+++ storage/
@@ -823,7 +823,8 @@
- boost::
+ boost::
+ boost::
),