更新时间:2023-11-09 GMT+08:00

k跳算法(k_hop)(1.0.0)

表1 parameters参数说明

参数

是否必选

类型

说明

k

Integer

跳数,取值范围[1,100]。

num_thread

Integer

并发线程数。范围为[1,40],小于1会自动置为1,大于40则自动置为40。默认值为4。

source

String

节点的ID。

mode

String

方向,取值如下:

  • OUT:沿出边跳。
  • IN:沿入边跳。
  • ALL:双向跳。

默认值为OUT

statistics

Boolean

是否仅返回邻居数统计结果,取值为true或false,默认值为false。

表2 response_data参数说明

参数

类型

说明

vertices

List

k跳内的节点id,格式:

[vertexId,...],

其中,vertexId:string类型

source

String

起点id。

k

Integer

跳数。

k_hop_neighbors

Integer

k跳内的节点个数(不包含起点)。