matlab图形学相关函数

来源:互联网 发布:行业利润率算法 编辑:程序博客网 时间:2024/06/16 11:34

Bioinformatics Toolbox functions

[dist] = graphallshortestpaths(G)

Find all shortest paths in graph

找到全部的最短路径

注意:此函数有bug(2007a版),在路径长度超过197.3624时将识别两个点不可达!当然可以通过归一化绕过bug,或者升级相应的文件,官网有下载。

[S, C] = graphconncomp(G)

Find strongly or weakly connected components in graph

找到有向图的强/连通分支

graphisdag(G)

Test for cycles in directed graph

测试有向图中的是否含有

[Isomorphic, Map]

= graphisomorphism(G1, G2)

Find isomorphism between two graphs

找到两个图的同构映射(当然必须是同构图)。如果不存在同构,返回false,最坏复杂度O(N!)

TF = graphisspantree(G)

Determine if tree is spanning tree

测试给定的图是否是生成树

[MaxFlow, FlowMatrix, Cut]= graphmaxflow(G, SNode, TNode)

Calculate maximum flow and minimum cut in directed graph

计算给定图的最大流最小割

[Tree, pred]

= graphminspantree(G)

Find minimal spanning tree in graph

计算给定图的最小生成树

path = graphpred2path(pred, D)

Convert predecessor indices to paths

对给定的树找出从根到叶的路径

[dist, path, pred]= graphshortestpath(G, S, T)

Solve shortest path problem in graph

计算给定图中节点(对)的最短路径

order = graphtopoorder(G)

Perform topological sort of directed acyclic graph

对给定的有向无环图进行拓扑排序

[disc, pred, closed]= graphtraverse(G, S)

Traverse graph by following adjacent nodes

给出图中节点(深度优先/宽度优先)的遍历序列

原创粉丝点击