Can we compute the graph Laplacian matrix for a directed graph?
15 次查看(过去 30 天)
显示 更早的评论
How to find graph laplacian matrix of a directed graph?
0 个评论
采纳的回答
Christine Tobler
2022-3-16
It depends how you want to define it, there is no one consistent definition of what the graph laplacian of a directed graph is. This wikipedia page https://en.wikipedia.org/wiki/Laplacian_matrix#Definitions_for_simple_graphs lists some options.
2 个评论
更多回答(1 个)
Bruno Luong
2022-3-16
编辑:Bruno Luong
2022-3-16
In this thread I give formula for graph, for digraph you just need to be careful about indegree or outdegree
% TMW example
s = [1 2 2 3 3 3 4 5 5 5 8 8 9];
t = [2 3 4 1 4 5 5 3 6 7 9 10 10];
G = digraph(s,t);
A = G.adjacency;
% Use Laplacian
Din = diag(sum(A,1)); % in degree matrix
Dout = diag(sum(A,2)); % in degree matrix
Lin = Din - A % laplacian matrix
Lout = Dout - A % laplacian matrix
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!