File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
demo/src/main/java/org/example Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -219,10 +219,10 @@ public static void main(String[] args) {
219219 RETURN d
220220 )
221221
222- FOR v,e, p IN 1..10 OUTBOUND start GRAPH tinkerpop
223- PRUNE cond = e.dist > 400
222+ FOR v, e, p IN 1..10 OUTBOUND start GRAPH tinkerpop
223+ PRUNE e.dist > 400 || v.code == @target
224224 OPTIONS { uniqueVertices: 'path', order: 'bfs' }
225- FILTER NOT cond
225+ FILTER e.dist <= 400
226226 FILTER v.code == @target
227227 LIMIT 5
228228 RETURN p
@@ -243,11 +243,7 @@ public static void main(String[] args) {
243243 List <Number > distances = (List <Number >) it .get ("distances" );
244244 StringBuilder sb = new StringBuilder ();
245245 for (int i = 0 ; i < distances .size (); i ++) {
246- sb
247- .append (path .get (i ))
248- .append (" -(" )
249- .append (distances .get (i ))
250- .append (")-> " );
246+ sb .append (path .get (i )).append (" -(" ).append (distances .get (i )).append (")-> " );
251247 }
252248 sb .append (path .getLast ());
253249 System .out .println (" Path (dist: " + it .get ("tot" ) + "): \t " + sb );
You can’t perform that action at this time.
0 commit comments