0

I have nodes in my graph that contain properties that are of type double[]. How can I do something like this in cypher?

for (int i=0; i < theArray.length(); i++)
    theArray[i] *= .8; 

This obviously doesn't work, but here is the general idea:

start a = node(0)
a.theArray = a.theArray*.8
return a;
4

1 回答 1

0

您可以使用extract类似的东西map并创建一个新的集合。

start n=node(0) 
set n.foo=extract(x in [1,2,3] : x*0.8)
return n

set n.foo = extract(x in n.foo : x*0.8)
于 2012-07-06T11:44:24.917 回答