[英]finding all paths in a graph including a vertex
I have a directed simple graph (named tutti) and a list of vertex (named risultato). 我有一个有向简单图(名为tutti)和一个顶点列表(名为risultato)。
I want to find the full set of subgraph extracted by "tutti" that includes a vertex in the array risultato. 我想找到由“ tutti”提取的全套子图,其中包括数组risultato中的一个顶点。
As example in the included picture the graph tutti 例如,在包含的图片中,图tutti
Given the vertex 609 (that is one vertex present in risultato) (in red on the left) i need to plot the graph in picture 给定顶点609(即risultato中存在一个顶点)(左侧为红色),我需要在图片中绘制图形
How can i extract all those graphs? 如何提取所有这些图?
The vertexes to be taken in consideration are in the array risultato. 要考虑的顶点在数组risultato中。
sottografierrorisopra<-graph.neighborhood (tutti,vcount(tutti),risultato, "in") sottografierrorisopra <-graph.neighbourhood(tutti,vcount(tutti),risultato,“ in”)
sottografierrorisotto<-graph.neighborhood (tutti,vcount(tutti),risultato, "out") sottografierrorisotto <-graph.neighbourhood(tutti,vcount(tutti),risultato,“出”)
zz<- graph.union (sottografierrorisopra, sottografierrorisotto) zz <-graph.union(sottografierrorisopra,sottografierrorisotto)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.