Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow different weight matrices to be passed in for path weight calculations #40

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

mmiller-max
Copy link
Contributor

Similarly to the update to shortest_path, allow users to pass their own weight matrices into total_path_weight and weights_from_path

@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2021

Codecov Report

Merging #40 (48ada27) into master (f1be1a9) will decrease coverage by 0.55%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
- Coverage   67.10%   66.54%   -0.56%     
==========================================
  Files          11       11              
  Lines         836      843       +7     
==========================================
  Hits          561      561              
- Misses        275      282       +7     
Impacted Files Coverage Δ
src/shortest_path.jl 84.61% <100.00%> (-2.23%) ⬇️
src/nearest_node.jl 94.11% <0.00%> (-5.89%) ⬇️
src/geometry.jl 98.92% <0.00%> (-1.08%) ⬇️
src/parse.jl 74.15% <0.00%> (-0.85%) ⬇️
src/graph.jl 58.13% <0.00%> (-0.69%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f1be1a9...48ada27. Read the comment docs.

Copy link
Collaborator

@captchanjack captchanjack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -119,12 +119,13 @@ Extracts edge weights from a path using `g.weights`.
# Arguments
- `g::OSMGraph`: Graph container.
- `path::Vector{T}`: Array of OpenStreetMap node ids.
- `weights=g.weights`: weights matrix.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put comment on kwarg in doc string

@@ -135,14 +136,15 @@ Extract total edge weight along a path.
# Arguments
- `g::OSMGraph`: Graph container.
- `path::Vector{T}`: Array of OpenStreetMap node ids.
- `weights=g.weights`: weights matrix.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kwarg description

@mmiller-max mmiller-max merged commit f955216 into master Aug 26, 2021
@mmiller-max mmiller-max deleted the mm/new-methods-for-weights branch August 26, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants