0

Can eles.breadthFirstSearch() be used to perform operations on the nodes it traverses over?
From the documentation:

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).

It looks like the callback function is only given the index and the depth.

If this isn't the right function, is there another which works better?

Thanks!

maxkfranz
  • 11,896
  • 1
  • 27
  • 36
JD.
  • 2,361
  • 6
  • 25
  • 38

1 Answers1

0

the "this" environment variable contains the current node

JD.
  • 2,361
  • 6
  • 25
  • 38