So let's see how to compute the node that's 2 hops away.
We simply look at our node that's 1 hop away and take its node that's 1 hop away,
and we'll continue as long as the number of hops away isn't greater than number of nodes.
So let's do an example here; we know that the successor--the node that's 1 hop away from node 0 is node 5,
so if we want to compute the node that's 2 hops away from 0,
we'll look to see that the successor to 0 is 5, and the successor to 5 is 2, so we'll fill in a 2 here.
The successor to 1 is 6, and the successor to 6 is node 3, so we'll fill in a 3 here.
The successor to node 2 is 7,
the successor to node 7 is node 4, so we'll fill in a 4 here.
And notice this is a perfectly data parallel operation.
Each one of these vertices can do this computation completely in parallel.
那么让我们看看如何计算2个跃点远的节点。
我们简单地看看我们1个 跃点外的节点,
然后取走它的1 个跃点外的节点,
只要跃点的数目小于节点的数目,我们就会继续。
让我们在这里举一个例子;我们知道接替节点 —— 离节点 0有1 跃点的是节点 5,
所以如果我们要计算离节点0有2个跃点的节点,
我们看到 0 的接替者是 5,而 5 的接替者是 2,
所以我们会在这儿填写 2。
1 的接替者是 6,而 6的接替者是节点 3,所以我们会在这儿填写 3。
节点 2 的接替者是 7,
节点 7 的接替者是节点 4,所以我们要在这儿填写 4。
注意这是一个完美的数据并行操作。
这些顶点中的每一个都可以完全并行地进行计算。