0
我面臨的是,當我改變權重是不反映在拉普拉斯矩陣問題如何使用networkX獲得有向加權網絡的拉普拉斯矩陣?
import numpy as np
import networkx as nx
#construction of directed graph
g=nx.DiGraph()
#adding weights to the links
g.add_weighted_edges_from([(1,2,0.65), (3,1,0.35),(2,3,0.85)])
#extracting the
L = nx.directed_laplacian_matrix(g)
L = nx.directed_laplacian_matrix(g)
print(L)
是否有任何直接的方法來提取加權有向圖的拉普拉斯矩陣? – arjun