max.flow(RBGL)
max.flow()所属R语言包:RBGL
Compute max flow for a directed graph
计算最大流量为一个有向图
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Compute max flow for a directed graph
计算最大流量为一个有向图
用法----------Usage----------
edmonds.karp.max.flow(g, source, sink)
push.relabel.max.flow(g, source, sink)
kolmogorov.max.flow(g, source, sink)
参数----------Arguments----------
参数:g
an instance of the graph class with edgemode “directed”
graph与edgemode“导演”之类的一个实例
参数:source
node name (character) or node number (int) for the source of the flow
节点名称(字符)或流源节点号(INT)
参数:sink
node name (character) or node number (int) for the sink of the flow
节点名称(字符)或节点号(INT),流水槽
Details
详情----------Details----------
Given a directed graph G=(V, E) of a single connected component with a vertex source and a vertex sink. Each arc has a positive real valued capacity, currently it's equivalent to the weight of the arc. The flow of the network is the net flow entering the vertex sink. The maximum flow problem is to determine the maximum possible value for the flow to the sink and the corresponding flow values for each arc.
鉴于有向图G =(V,E)的顶点source和的顶点sink一个单一的连接组件。每个弧有一个积极的实际价值的能力,目前它的相当于弧重量。网络流量是净流入,进入顶点sink。最大流问题是,以确定sink和每个弧对应的流量值流量的最大可能值。
See documentation on these algorithms in Boost Graph Library for more details.
这些算法的文档Boost Graph库中看到更多细节。
值----------Value----------
A list of
一列
参数:maxflow
the max flow from source to sink
最大流量从sourcesink
参数:edges
the nodes of the arcs with non-zero capacities
的与非零能力的弧的节点
参数:flows
the flow values of the arcs with non-zero capacities
与非零能力的弧流值
作者(S)----------Author(s)----------
Li Long <li.long@isb-sib.ch>
参考文献----------References----------
by Jeremy G. Siek, Lie-Quan Lee, and Andrew Lumsdaine; (Addison-Wesley, Pearson Education Inc., 2002), xxiv+321pp. ISBN 0-201-72914-8
参见----------See Also----------
minCut, edgeConnectivity
minCut,edgeConnectivity
举例----------Examples----------
con <- file(system.file("XML/dijkex.gxl",package="RBGL"), open="r")
g <- fromGXL(con)
close(con)
ans1 <- edmonds.karp.max.flow(g, "B", "D")
ans2 <- edmonds.karp.max.flow(g, 3, 2) # 3 and 2 equivalent to "C" and "B"[3和2当量为“C”和“B”]
ans3 <- push.relabel.max.flow(g, 2, 4) # 2 and 4 equivalent to "B" and "D"[相当于2和4为“B”和“D”]
ans4 <- push.relabel.max.flow(g, "C", "B")
# error in the following now[现在在下面的错误]
#ans5 <- kolmogorov.max.flow(g, "B", "D")[ANS5 < - kolmogorov.max.flow(G,“B”的“D”)]
#ans6 <- kolmogorov.max.flow(g, 3, 2) [ANS6 < - kolmogorov.max.flow(G,3,2)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|