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

Add minweight and maxweight arguments to k-shortest path algorithms. #2915

Merged
merged 7 commits into from
Jan 24, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Jan 18, 2019

The two new arguments allow the filtering of paths that do not meet the
mininum and maximum weight requirements.

Added unit tests.

Fixes #1778


This change is Reviewable

The two new arguments allow the filtering of paths that do not meet the
mininum and maximum weight requirements.

Added unit tests.
@martinmr martinmr requested a review from manishrjain January 18, 2019 22:10
Set minweight and maxweight to the minimum and maximum possible float
values respectively when they are not passed explicitly.
@martinmr martinmr self-assigned this Jan 22, 2019
Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @martinmr)


query/query.go, line 801 at r1 (raw file):

	}

	if v, ok := gq.Args["depth"]; ok && (args.Alias == "shortest") {

Would make sense to move all these && args.Alias == "shortest" to one big if condition.

Copy link
Contributor Author

@martinmr martinmr left a comment

Choose a reason for hiding this comment

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

Reviewable status: 3 of 5 files reviewed, 1 unresolved discussion (waiting on @manishrjain)


query/query.go, line 801 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

Would make sense to move all these && args.Alias == "shortest" to one big if condition.

Done.

@martinmr martinmr merged commit 6d3ac38 into master Jan 24, 2019
@martinmr martinmr deleted the martinmr/k-shortest-paths-weights branch January 24, 2019 19:20
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
…graph-io#2915)

The two new arguments allow the filtering of paths that do not meet the
mininum and maximum weight requirements.

Added unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants