在neo4j构建好节点和关系图谱后,想计算每个节点的介数中心性并写入属性,但执行时却出现报错。
代码如下:
CALL gds.betweenness.write('myGraph', { writeProperty: 'betweenness' })
YIELD centralityDistribution, nodePropertiesWritten
RETURN centralityDistribution.min AS minimumScore, centralityDistribution.mean AS meanScore, nodePropertiesWritten
运行结果报错如下:
Failed to invoke procedure 'gds.betweenness.write':Caused by:
java.lang.ArrayIndexOutOfBoundsException: The value -1166327.1299011214 is out of bounds for
histogram,current covered range [0.5, 2.147483648E9) cannot be extended any further.
Caused by: java.lang.ArrayIndexOutOfBoundsException:Negative values cannot be recorded