找回密码
 注册
查看: 530|回复: 0

R语言 graph包 graph-class()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-25 21:08:50 | 显示全部楼层 |阅读模式
graph-class(graph)
graph-class()所属R语言包:graph

                                        Class "graph"
                                         类“图”

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

A virtual class that all graph classes should extend.
虚拟类,所有的图类应延长。


Details

详情----------Details----------

degree returns either a named vector (names correspond to the nodes in the graph) containing the degree for undirected graphs or a list with two components, inDegree and outDegree for directed graphs.
degree返回一个名为向量(名称对应图中的节点),其中包含两部分组成的无向图或列表的程度,inDegree和outDegree向图。

connComp returns a list of the connected components. Each element of this list contains the labels of all nodes in that component.
connComp返回一个连接组件的列表。此列表的每个元素都包含在该组件中的所有节点的标签。

For a directed graph or digraph the <DFN>underlying graph</DFN> is the graph that results from removing all direction from the edges. This can be achieved using the function ugraph.
对于一个有向图或有向图的基础图<DFN> </ DFN封装图,从各个方向的边缘。这样就可以实现使用功能ugraph。

A <DFN>weakly connected</DFN> component of a digraph is one that is a connected component of the underlying graph. This is the default for connComp. A digraph is  <DFN>strongly connected</DFN> if every two vertices are mutually reachable. A <DFN>strongly connected</DFN> component of a digraph, <STRONG>D</STRONG>, is a maximal strongly connected subdigraph of <STRONG>D</STRONG>. See the RBGL package for an implementation of Trajan's algorithm to find strongly connected components (strongComp).
一个<DFN>弱连接</ DFN封装>一个有向图的组成部分之一,是连接组件的底层图形。这是默认connComp。一个有向图<DFN>强烈连接</ DFN封装>如果每两个顶点是互相可达。一个<DFN>强烈连接</ DFN封装>一个有向图的组成部分,<STRONG>,D </ strong>中,是一个强烈连接<STRONG>&#240;</ STRONG>最大subdigraph。看到图拉真执行的算法,找到强连通分量的RBGL包(strongComp)。

In the graph implementation of connComp weak connectivity is used. If the argument to connComp is a directed graph then ugraph is called to create the underlying undirected graph and that is used to compute connected components. Users who want different behavior are encouraged to use RBGL.
中graph实施connComp弱连接使用。如果connComp参数是一个有向图,然后ugraph被称为创建基本无向图,用来计算连接组件。用户需要不同的行为,鼓励使用RBGL。


类的对象----------Objects from the Class----------

A virtual Class: No objects may be created from it.
可以从它创建一个虚拟类:无对象。


插槽----------Slots----------




edgeData: An attrData instance for edge attributes.
edgeData:attrData边缘属性的实例。




nodeData: An attrData instance for node attributes.
nodeData:attrData节点属性的实例。




graphData: A list for graph-level attributes. Only mandatory list item is edgemode which indicates whether edges are "directed" or
graphData:一个list图属性。只有强制性的列表项是edgemode这表明边缘是否"directed"




renderInfo: A list of graph rendering information.
renderInfo:一个list图形渲染信息。


方法----------Methods----------




nodes return a character vector containing the names of the
节点返回一个字符向量的名称




nodes<- rename the nodes of the graph
节点< - 重命名节点图




show signature(object = "graph"):A print method for
显示signature(object = "graph"):打印方法




acc signature(object = "graph"): find all nodes
ACCsignature(object = "graph"):找到的所有节点




complement signature(x = "graph"): compute the complement of the supplied graph. The complement is defined with respect to the complete graph on the nodes in x.
补充signature(x = "graph"):计算所提供的图的补充。补是指对在x的节点的完全图。




connComp signature(object = "graph"): find the
connCompsignature(object = "graph"):找到




degree signature(object = "graph", Nodes = "missing"):
度signature(object = "graph", Nodes = "missing"):




degree signature(object = "graph", Nodes = "ANY"): as
度signature(object = "graph", Nodes = "ANY"):




degree signature(object = "MultiGraph", Nodes = "missing"):
度signature(object = "MultiGraph", Nodes = "missing"):




dfs signature(object = "graph"): execute a depth first
DFSsignature(object = "graph"):执行深度优先




edges signature(object="graph", which="character"): return the edges indicated by which. which can be missing in which case all edges are returned or it can be a character vector with the node labels indicating the nodes whose
边缘signature(object="graph", which="character"):返回由which表示的边缘。 which可以丢失所有边缘,在这种情况下,被退回或它可以是一个特征向量表示节点的节点标签




edgeDataDefaults Get and set default attributes for the edges
edgeDataDefaults获取和设置边缘的默认属性




edgeData Get and set attributes for edges in the graph
edgeData获取和设置属性的边缘图




edgemode signature(object="graph"): return the edgemode for the graph. Currently this can be either
edgemodesignature(object="graph"):返回的图edgemode。目前,这可以是




edgemode<- signature(object="graph",         value="character"): set the edgemode for the graph. Currently this can be either
edgemode < - signature(object="graph",         value="character"):edgemode图设置。目前,这可以是




edgeWeights Return a list of edge weights in a list format
edgeWeights返回列表格式的边权重列表




intersection signature(x = "graph", y = "graph"): compute the intersection of the two supplied graphs. They must have identical nodes. Currently this returns an object of class
路口signature(x = "graph", y = "graph"):计算提供两个图形的交点。他们必须具有相同的节点。目前,此方法返回一个类对象




isAdjacent signature(from="character",
isAdjacent的<code>签名(=“字符”,




isConnected signature(object = "graph"): A boolean
isConnectedsignature(object = "graph"):一个布尔值




isDirected Return TRUE if the graph object has
isDirected返回TRUE如果图形对象




join signature(x = "graph", y = "graph"): returns the joining of two graphs.  Nodes which are shared by both graphs will have their edges merged.  Note that edgeWeights for the resulting graph are all set to 1.  Users wishing to preserve weights in a join operation must
加入signature(x = "graph", y = "graph"):返回两个图形的加入。这是由两个图形共享的节点将合并其边缘。请注意,生成的图形edgeWeights都设置为1。用户希望保持连接操作中的权重




nodes<- A generic function that allows different implementations of the graph class to reset the node
节点< - 一个通用的功能,允许不同的实现graph类重置节点




nodeDataDefaults Get/set default attributes for nodes in the
nodeDataDefaults获取/设置默认属性在节点




nodeData Get/set attributes for nodes in the graph.
nodeData获取/设置图中的节点的属性。




numEdges signature(object = "graph"): compute the
numEdgessignature(object = "graph"):计算




numNodes signature(object = "graph"): compute the
numNodessignature(object = "graph"):计算




plot Please see the help page for the plot.graph
绘制plot.graph请参阅帮助页面




union signature(x = "graph", y = "graph"): compute the union of the two supplied graphs. They must have identical
工会signature(x = "graph", y = "graph"):计算工会提供两个图。它们必须有相同的




edgeNames signature(object = "graph"): Returns a vector of the edge names for this graph, using the format tail\~head, where head is the name of the tail node
edgeNamessignature(object = "graph"):返回此图的边缘名称的向量,使用的格式tail\~head,head是尾节点的名称




updateGraph signature(object = "graph"): Updates old
updateGraphsignature(object = "graph"):更新旧


作者(S)----------Author(s)----------


R. Gentleman and E. Whalen.



参考文献----------References----------

<h3>See Also</h3>  <code>graphNEL-class</code>, <code>graphAM-class</code>, <code>distGraph-class</code>.

举例----------Examples----------


  set.seed(123)
  g1 <- randomGraph(letters[1:10], 1:4, p= 0.3)
  numEdges(g1)
  edgeNames(g1)
  edges(g1)
  edges(g1, c("a","d")) # those incident to 'a' or 'd'[这些事件,以A或D]

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-2-6 14:55 , Processed in 0.023876 second(s), 16 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表