类文档

表示图中单个顶点的类。

顶点通过其索引引用,因此如果底层图发生变化,顶点对象的语义也可能会改变(如果原始图中的顶点索引被更改)。

顶点的属性可以通过将顶点用作哈希来访问

>>> v["color"] = "red"                  #doctest: +SKIP
>>> print(v["color"])                     #doctest: +SKIP
red
方法 all_edges Graph.incident(..., mode="all") 的代理方法
方法 attribute_names 返回顶点属性名称列表
方法 attributes 返回一个包含顶点属性名称和值的字典
方法 betweenness Graph.betweenness() 的代理方法
方法 closeness Graph.closeness() 的代理方法
方法 constraint Graph.constraint() 的代理方法
方法 degree Graph.degree() 的代理方法
方法 delete Graph.delete_vertices() 的代理方法
方法 distances Graph.distances() 的代理方法
方法 diversity Graph.diversity() 的代理方法
方法 eccentricity Graph.eccentricity() 的代理方法
方法 get_shortest_paths Graph.get_shortest_paths() 的代理方法
方法 in_edges Graph.incident(..., mode="in") 的代理方法
方法 incident Graph.incident() 的代理方法
方法 indegree Graph.indegree() 的代理方法
方法 is_minimal_separator Graph.is_minimal_separator() 的代理方法
方法 is_separator Graph.is_separator() 的代理方法
方法 neighbors Graph.neighbors() 的代理方法
方法 out_edges Graph.incident(..., mode="out") 的代理方法
方法 outdegree Graph.outdegree() 的代理方法
方法 pagerank Graph.pagerank() 的代理方法
方法 personalized_pagerank Graph.personalized_pagerank() 的代理方法
方法 predecessors Graph.predecessors() 的代理方法
方法 strength Graph.strength() 的代理方法
方法 successors Graph.successors() 的代理方法
方法 update_attributes 从字典/可迭代对象 E 和 F 更新顶点的属性。
def all_edges():

Graph.incident(..., mode="all") 的代理方法

此方法调用 Graph 类的 `incident()` 方法,并将此顶点作为第一个参数,"all" 作为模式参数,然后返回结果。

另请参阅
详情请参阅 Graph.incident()
def attribute_names():

返回顶点属性名称列表

def attributes():

返回一个包含顶点属性名称和值的字典

def betweenness(*args, **kwds):

Graph.betweenness() 的代理方法

此方法调用betweenness()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.betweenness()
def closeness(*args, **kwds):

Graph.closeness() 的代理方法

此方法调用closeness()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.closeness()
def constraint(*args, **kwds):

Graph.constraint() 的代理方法

此方法调用constraint()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.constraint()
def degree(*args, **kwds):

Graph.degree() 的代理方法

此方法调用degree()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.degree()
def delete(*args, **kwds):

Graph.delete_vertices() 的代理方法

此方法调用delete_verticesGraph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.delete_vertices()
def distances(*args, **kwds):

Graph.distances() 的代理方法

此方法调用distances()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.distances()
def diversity(*args, **kwds):

Graph.diversity() 的代理方法

此方法调用diversity()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.diversity()
def eccentricity(*args, **kwds):

Graph.eccentricity() 的代理方法

此方法调用eccentricity()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.eccentricity()
def get_shortest_paths(*args, **kwds):

Graph.get_shortest_paths() 的代理方法

此方法调用get_shortest_paths()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.get_shortest_paths()
def in_edges():

Graph.incident(..., mode="in") 的代理方法

此方法调用 Graph 类的 `incident()` 方法,并将此顶点作为第一个参数,"in" 作为模式参数,然后返回结果。

另请参阅
详情请参阅 Graph.incident()
def incident(*args, **kwds):

Graph.incident() 的代理方法

此方法调用incident()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.incident()
def indegree(*args, **kwds):

Graph.indegree() 的代理方法

此方法调用indegree()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.indegree()
def is_minimal_separator(*args, **kwds):

Graph.is_minimal_separator() 的代理方法

此方法调用is_minimal_separator()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.is_minimal_separator()
def is_separator(*args, **kwds):

Graph.is_separator() 的代理方法

此方法调用is_separator()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.is_separator()
def neighbors(*args, **kwds):

Graph.neighbors() 的代理方法

此方法调用neighbors()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.neighbors()
def out_edges():

Graph.incident(..., mode="out") 的代理方法

此方法调用 Graph 类的 `incident()` 方法,并将此顶点作为第一个参数,"out" 作为模式参数,然后返回结果。

另请参阅
详情请参阅 Graph.incident()
def outdegree(*args, **kwds):

Graph.outdegree() 的代理方法

此方法调用outdegree()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.outdegree()
def pagerank(*args, **kwds):

Graph.pagerank() 的代理方法

此方法调用pagerank()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.pagerank()
def personalized_pagerank(*args, **kwds):

Graph.personalized_pagerank() 的代理方法

此方法调用personalized_pagerank()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.personalized_pagerank()
def predecessors(*args, **kwds):

Graph.predecessors() 的代理方法

此方法调用predecessors()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.predecessors()
def strength(*args, **kwds):

Graph.strength() 的代理方法

此方法调用strength()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.strength()
def successors(*args, **kwds):

Graph.successors() 的代理方法

此方法调用successors()Graph 类的此方法,并将此顶点作为第一个参数,然后返回结果。

另请参阅
详情请参阅 Graph.successors()
def update_attributes(E, **F):

从字典/可迭代对象 E 和 F 更新顶点的属性。

如果 E 具有keys()方法,它会执行for k in E: self[k] = E[k]。如果 E 缺少keys()方法,它会执行for (k, v) in E: self[k] = v。无论哪种情况,之后都会执行for k in F: self[k] = F[k].

因此,此方法的行为类似于 Python 字典的update()方法。