For example, a common weighting scheme consists in giving each neighbor a weight of 1/d, where d is the distance to the neighbor.
例如，一种常见的加权方案是给每个邻居权重赋值为1/ d，其中d是到邻居的距离。