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

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

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

                                        Class "graphNEL"
                                         类“graphNEL”

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

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

This is a class of graphs that are represented in terms of nodes and an edge list. This is a suitable representation for a graph with a
这是一类图的节点和边列表表示。这是一个适合与图形表示


Details

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

The graphNEL class provides a very general structure for representing graphs. It will be reasonably efficient for lists with relatively more nodes than edges.  Although this representation can support multi-edges, such support is not implemented and instances of graphNEL are assumed to be simple graphs with at most one edge between any pair of nodes.
graphNEL类为代表图提供了一个非常普遍的结构。这将是合理的效率比边缘相对较多的节点列表。虽然这种表示可以支持多边缘,这种支持是没有实现的情况下graphNEL假设是简单的图表,在最一对节点之间的任何边缘。

The edgeL is a named list of the same length as the node vector. The names are the names of the nodes. Each element of edgeL is itself a list. Each element of this (sub)list is a vector (all must be the same length) and each element represents an edge to another node. The sublist named edges holds index values into the node vector. And each such entry represents an edge from the node which has the same name as the component of edgeL to the node with index provided. Another component that is often used is named weights. It represents edge weights. The user can specify any other edge attributes (such as types etc). They are responsible for any special handling that these might require.
edgeL是一个名为list为节点向量的长度相同。名字是节点的名称。 edgeL的每个元素本身就是一个列表。 (分)列表中的每个元素是一个向量(都必须是相同的长度),每个元素代表一个边缘到另一个节点。子表名为edges的保存到节点向量的索引值。和每个条目代表从节点具有相同的名称为指数提供的节点组件edgeL的边缘。另一个经常被使用的组件被命名为weights。它代表了边权重。用户可以指定任何其他的边缘属性(如类型等)。他们负责,这些可能需要的任何特殊处理。

For an undirected instance all edges are reciprocated (there is an edge from A to B and from B to A).
对于undirected实例的所有边缘回报(从A到B和从B到A的边缘)。

Note that the reason for using indices to represent the to end of a node is so that we can easily support permutation of the node labels as a way to generate randomizations of the graph.
请注意,原因是使用指数来代表to节点,使我们可以轻松地支持作为一种方法来生成随机化图形的节点标签的排列。


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

Objects can be created by calls of the form new("graphNEL", nodes, edgeL, edgemode).
创建对象可以通过检测的形式new("graphNEL", nodes, edgeL, edgemode)。




nodes A character vector of node labels.
节点的节点标签的特征向量。




edgeL A named list either in the format returned by the edges method or a list of lists where each inner list has an element named edges and optionally an element named weights.  If weights is present, it must be the same
edgeL命名名单的格式返回edges方法或一个列表,其中每个内部列表的元素命名为edges和可选的元素命名为weights。 weights如果存在,它必须是相同的




edgemode Either "directed" or "undirected".
edgemode“定向”或“无方向”。


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




nodes: Object of class "vector".
nodes类"vector"的对象。




edgeL: Object of class "list". The edgeL must be the same length as nodes. The elements of this vector correspond to the same element in nodes. The elements are themselves lists. If the node has any edges then this list will have an element named edges.  This will eventually change.  Since edge weights are now stored in the edge attributes construct, we do not need the extra level of list.
edgeL类"list"的对象。 edgeL必须是相同的长度为nodes。该向量的元素对应到相同的元素在nodes。元素是自己的名单。如果节点有任何边缘,那么这个名单将有一个元素名为edges。这将最终改变。由于边权重,现在存储结构的边缘属性,我们不需要额外的列表水平。


延伸----------Extends----------

Class "graph", directly.
类"graph",直接。


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




adj signature(object = "graphNEL"): A method for
形容词signature(object = "graphNEL")方法:




edgeL signature(graph = "graphNEL"): A method for
edgeLsignature(graph = "graphNEL")方法:




edgeWeights signature(object = "graphNEL"): A method
edgeWeightssignature(object = "graphNEL"):一个方法




edges signature(object = "graphNEL"): A method for
边signature(object = "graphNEL"):一个方法。




inEdges signature(node = "character", object = "graphNEL"): Return the incoming edges for the specified
inEdgessignature(node = "character", object = "graphNEL"):返回指定传入的边缘




nodes signature(object = "graphNEL"): A method for
节点signature(object = "graphNEL"):一个方法。




numNodes signature(object = "graphNEL"):A method for
numNodessignature(object = "graphNEL")方法:




subGraph signature(snodes="character", graph =         "graphNEL"):A method for obtaining the induced subgraph based on the set of supplied nodes
子signature(snodes="character", graph =         "graphNEL"):一个方法获得的诱导子的基础上提供的节点集




plot Please see the help page for plot.graphNEL in the
绘制,请在帮助页面看到plot.graphNEL




graph2graphviz signature(object = "graphNEL"): A method that will convert a graphNEL object into a matrix suitable for interaction with Rgraphviz.  Not intended to be called directly.  This function will insure that no NA's (or other
graph2graphvizsignature(object = "graphNEL"):一个方法将其转换成一个graphNEL对象为适合Rgraphviz相互作用矩阵。不打算直接调用。此功能将确保没有不适用的(或其他




nodes<- signature(object="graphNEL",         value="character"): A method for replacing the nodes in a graph object. It checks to be sure the values are the right length and
节点< - signature(object="graphNEL",         value="character"):更换一个图形对象的节点的方法。它检查到一定的值是正确的长度和




coerce signature(from = "graphNEL", to = "graphAM"): Called via as, the method converts to an adjacency matrix
要挟signature(from = "graphNEL", to = "graphAM"):通过as调用,该方法转换为邻接矩阵




coerce signature(from = "graphNEL", to = "graphBAM"): Called via as, the method converts to an bit array
要挟signature(from = "graphNEL", to = "graphBAM"):通过as调用,方法转换到一个位阵列


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


R. Gentleman



参见----------See Also----------

graphAM-class, distGraph-class, clusterGraph-class
graphAM-class,distGraph-class,clusterGraph-class


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


   set.seed(123)
   V <- LETTERS[1:4]
   edL <- vector("list", length=4)
   names(edL) <- V
   for(i in 1:4)
      edL[[i]] <- list(edges=5-i, weights=runif(1))
   gR <- new("graphNEL", nodes=V, edgeL=edL)
   edges(gR)
   edgeWeights(gR)

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


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2025-2-6 17:59 , Processed in 0.035589 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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