pysal.lib.weights.mat2L

pysal.lib.weights.mat2L(edge_matrix)[源代码]

将表示网络连接(边或流)的矩阵转换为表示边的列表

参数:
edge_matrix : 数组

其中,行表示网络边缘起点,列表示网络边缘终点,非零项表示给定起点和终点之间存在边缘。

返回:
edge_list : 列表

其中每个元组的形式为(o,d),其中o是源ID,d是目标ID。