pysal.lib.weights.shimbel

pysal.lib.weights.shimbel(w)[源代码]

找到一阶邻接矩阵的希姆贝尔矩阵。

参数:
w : W

空间权重对象

返回:
info : 列表

列表列表;每个观测的一个列表,存储它和其他观测之间的最短顺序。

实例

>>> from pysal.lib.weights import lat2W
>>> w5 = lat2W()
>>> w5_shimbel = shimbel(w5)
>>> w5_shimbel[0][24]
8
>>> w5_shimbel[0][0:4]
[-1, 1, 2, 3]
>>>