0

eles.breadthFirstSearch() 可以用来在它遍历的节点上执行操作吗?
从文档中:

eles.breadthFirstSearch( [function(i, depth)] [, directed] )
function(i, depth) A handler function that is called when a node is visited in the search.
– i The index indicating this node is the ith visited node.
– depth How many edge hops away this node is from the root nodes.
directed A boolean indicating whether the search should only go along edges from source to target (default true).

看起来回调函数只给出了索引和深度。

如果这不是正确的功能,还有其他更好的功能吗?

谢谢!

4

1 回答 1

0

“this”环境变量包含当前节点

于 2013-08-27T18:13:49.423 回答