Created
May 15, 2022 18:23
-
-
Save danshev/07c059c6ffd683c745a4c62ee6ec768e to your computer and use it in GitHub Desktop.
First Traversal Query
This file contains 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
g.withSack(120).V( DEPARTURE_PORT ). | |
repeat( | |
(outE().hasLabel('VOYAGES_TO'). | |
sack(sum).by('duration')). | |
sack(sum).by(constant(45) | |
). | |
inV().simplePath() | |
). | |
until( | |
has('code', CANDIDATE_PORT ). | |
and().sack().is(lte( TOTAL_TRAVEL_TIME_LIMIT )) | |
). | |
order(). | |
by(sack()). | |
local( | |
union(path(). | |
by('code').by('duration'), sack()).fold() | |
). | |
local(unfold().unfold().fold()). | |
unfold() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment