Python - 计算边邻接矩阵(线图)的高效算法
有谁知道计算 边邻接矩阵的有效算法(也称为折线图从传统的顶点邻接矩阵开始的图 (G) 的 L(G))?
根据定义
G 的边邻接矩阵 E 是一个对称方阵,当且仅当边 i 与边 j 相邻时,其元素 eij 才为 1。如果两条边与公共顶点相交,则它们是相邻的。
目标转换示例。新图中节点和边的角色颠倒了。
Does anyone know an efficient algorithm to compute the edge-adjacency matrix (also known as the line graph L(G)) of a graph (G) starting from its traditional vertex-adjacency matrix?
By definition
The edge-adjacency matrix E of G is a square and symmetric matrix whose elements eij are 1 if and only if edge i is adjacent to edge j. Two edges are adjacent if they are incidents to a common vertex.
Target transformation example. The nodes and edges’ roles are inversed in the new graph.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论