krlawrence / graph

Practical Gremlin - An Apache TinkerPop Tutorial
Apache License 2.0
830 stars 251 forks source link

Add an example where a path includes constant modulators #249

Open krlawrence opened 1 year ago

krlawrence commented 1 year ago

Add an example such as

gremlin> g.V().has('code','YPO').outE().inV().outE().inV().simplePath().path().by(constant(0)).by('dist')
==>[0,188,0,55,0]
gremlin> g.V().has('code','YPO').outE().inV().outE().inV().simplePath().path().by(constant(0)).by('dist').sum(local)
==>243