Comments - OQGRAPH Examples

 
2 weeks, 3 days ago Gianni Miceli

In I have two or more paths between a couple of nodes in my graph, and I want to give priority to a specific path even if it crosses more nodes than the others, is it possible to set a value in the 'weight' field in the oq_backing table to give such priority? If yes, priority is obtained by assigning lower or higher values of 'weight'?

 
6 years, 5 months ago Mike Reiche

Is it possible to query the previous node for the sequence?

SELECT * FROM oq_graph g
WHERE g.latch='dijkstras' AND g.origid=1;

Actual result:

latch	origid	destid	weight	seq	linkid
dijkstras	1	NULL	4	6	5
dijkstras	1	NULL	3	5	4
dijkstras	1	NULL	2	4	6
dijkstras	1	NULL	2	3	3
dijkstras	1	NULL	1	2	2
dijkstras	1	NULL	0	1	1

Expected result:

latch	origid	destid	weight	seq	linkid	prev
dijkstras	1	NULL	4	6	5	4
dijkstras	1	NULL	3	5	4	3
dijkstras	1	NULL	2	4	6	2
dijkstras	1	NULL	2	3	3	2
dijkstras	1	NULL	1	2	2	1
dijkstras	1	NULL	0	1	1	NULL
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.