Repository navigation
fix(routing): let the cost-matrix functions take one vertex set - #824
Open
MathiasVDA wants to merge 2 commits into
Open
MathiasVDA wants to merge 2 commits into
MathiasVDA wants to merge 2 commits into
Conversation
pgr_dijkstraCostMatrix and the other *CostMatrix forms take the pgr:start_vid set as the ends when no pgr:end_vid is given, as pgRouting's pgr_dijkstraCostMatrix(edges, vids) does. Closes #817
Contributor
Author
|
The Generated by Claude Code |
Contributor
Author
|
Review (Reviewer 2), round 1 at cfcf97d: approved, waits for #828
Generated by Claude Code |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Mathias · project thread
Closes #817
What
pgr_dijkstraCostMatrixand the other*CostMatrixforms (aStar,bdDijkstra,bdAstar,withPoints) take one vertex set, as pgRouting'spgr_dijkstraCostMatrix(edges, vids)does. With onlypgr:start_vids, the ends are the starts, so the call answers every ordered pair of different vertices. Before, it failed withpgr: missing pgr:end_vid. The two-set form is unchanged, andpgr_dijkstraCostwithout ends still fails.Tests
cost_matrices_take_one_vertex_set(crates/tripletrail/tests/sparql.rs): dijkstra, bdDijkstra and withPoints cost matrices with one set give the same rows as with the set given as ends too, and no row from a vertex to itself.cargo test -p tripletrail-server --test guide.Docs
docs/routing.md, the routing chapter of the guide, CHANGELOG (Unreleased, Fixed).
Checks
cargo fmt --check,cargo clippy -p tripletrail-pgr -p tripletrail --all-targets -- -D warnings,cargo test -p tripletrail --test sparql cost_matrices,cargo test -p tripletrail-pgr,cargo test -p tripletrail-server --test guide.Generated by Claude Code