Query wrappers (distance/distances_from) + real-corpus benchmark; 0.3.0 - #6
Merged
Merged
Conversation
…om empty-targets behavior Resolves 2 cargo-doc 'redundant explicit link target' warnings introduced with the wrappers (INF_WEIGHT resolves without the explicit crate:: target), and documents that distances_from returns early on empty targets without checking source. Doc-only; cargo doc --no-deps now warning-free.
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.
Summary
Closes two gaps from the post-0.2.0 list and preps the 0.3.0 release.
Query convenience wrappers (#4)
Adds the point-to-point and one-to-many query functions the README already advertised but never exported:
Thin, zero-cost wrappers over the existing
distance_matrix(single source), so they inherit its bit-identical, bounds-elided query path. Semantics matchdistance_matrix:INF_WEIGHTfor unreachable,distance(s, s) == 0,distances_from(s, &[])→ empty vec.Real-corpus benchmark (#3)
New env-gated
benches/real_corpus.rs— measures customize parallel scaling (1 vs N threads) and a query suite on a genuine road network in the crate's own bundle format. Gated onCCH_CORPUS/CCH_CORPUS_METRIC; a plaincargo benchis a clean no-op (no cases registered). Nothing large is committed.Measured on a real road network (Albania, ~6.29M nodes, 18 cores):
customizeruns 366.87 ms single-threaded → 80.7 ms on 18 threads (~4.55×) — notably better than the synthetic grids (~2.8× at 656k), consistent with real road networks having far better separators than grids. This is the honest continental data point the grid benches only approximated.Release
Bumps
0.2.0 → 0.3.0(minor: new public API), CHANGELOG[0.3.0]entry, README API table + real-corpus number + install pin.Verification
clippy --all-targets -D warnings,fmt --check,cargo doc --no-deps(warning-free), andcargo llvm-cov --fail-under-lines 100all clean.unsafe;distance_matrix, the query engine,Cchlayout, and on-disk formats unchanged.Cutting
v0.3.0after merge will be the first live exercise of the automated (Trusted Publishing) release pipeline.