4 ms·
Do you mean iterating on an agency matrix dimension times to get the full path length between any two nodes? I have had to run my recursive queries external to
by seg_lol 6y ago
Do you mean iterating on an agency matrix dimension times to get the full path length between any two nodes?
I have had to run my recursive queries external to the database (MySQL, SQLite), this change looks to bring it into the database. Excellent news!
- castratikron 6y agoTransitive closure will tell you if a path between two nodes exists, not the length of the shortest path between two nodes.
- whoisburbansky 6y agoYou're technically correct, but afaik there isn't really a way to compute transitive closure without also computing shortest paths along the way, modulo constant factors?
- simcop2387 6y agoYou'll compute paths along the way but won't know that they're the shortest path. Odds are good though that you'll havr found something good enough for most purposes though.
- whoisburbansky 6y agoIf all you do is iterate over the adjacency matrix, sure, but wouldn't Floyd-Warshall be the same time complexity? All I'm saying is that you get both pieces of information for essentially the same price, modulo constant factors.