class Vertex:
Class representing a single vertex in a graph.
The vertex is referenced by its index, so if the underlying graph changes, the semantics of the vertex object might change as well (if the vertex indices are altered in the original graph).
The attributes of the vertex can be accessed by using the vertex as a hash:
>>> v["color"] = "red" #doctest: +SKIP >>> print(v["color"]) #doctest: +SKIP red
Method | all |
Proxy method to Graph.incident(..., mode="all") |
Method | attribute |
Returns the list of vertex attribute names |
Method | attributes |
Returns a dict of attribute names and values for the vertex |
Method | betweenness |
Proxy method to Graph.betweenness() |
Method | closeness |
Proxy method to Graph.closeness() |
Method | constraint |
Proxy method to Graph.constraint() |
Method | degree |
Proxy method to Graph.degree() |
Method | delete |
Proxy method to Graph.delete_vertices() |
Method | diversity |
Proxy method to Graph.diversity() |
Method | eccentricity |
Proxy method to Graph.eccentricity() |
Method | get |
Proxy method to Graph.get_shortest_paths() |
Method | in |
Proxy method to Graph.incident(..., mode="in") |
Method | incident |
Proxy method to Graph.incident() |
Method | indegree |
Proxy method to Graph.indegree() |
Method | is |
Proxy method to Graph.is_minimal_separator() |
Method | is |
Proxy method to Graph.is_separator() |
Method | neighbors |
Proxy method to Graph.neighbors() |
Method | out |
Proxy method to Graph.incident(..., mode="out") |
Method | outdegree |
Proxy method to Graph.outdegree() |
Method | pagerank |
Proxy method to Graph.pagerank() |
Method | personalized |
Proxy method to Graph.personalized_pagerank() |
Method | predecessors |
Proxy method to Graph.predecessors() |
Method | shortest |
Proxy method to Graph.shortest_paths() |
Method | strength |
Proxy method to Graph.strength() |
Method | successors |
Proxy method to Graph.successors() |
Method | update |
Updates the attributes of the vertex from dict/iterable E and F. |
Proxy method to Graph.incident(..., mode="all")
This method calls the incident() method of the Graph
class with this vertex as the first argument and "all" as the mode argument, and returns the result.
See Also | |
Graph.incident() for details. |
Proxy method to Graph.betweenness()
This method calls the betweenness() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.betweenness() for details. |
Proxy method to Graph.closeness()
This method calls the closeness() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.closeness() for details. |
Proxy method to Graph.constraint()
This method calls the constraint() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.constraint() for details. |
Proxy method to Graph.degree()
This method calls the degree() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.degree() for details. |
Proxy method to Graph.delete_vertices()
This method calls the delete_vertices method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.delete_vertices() for details. |
Proxy method to Graph.diversity()
This method calls the diversity() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.diversity() for details. |
Proxy method to Graph.eccentricity()
This method calls the eccentricity() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.eccentricity() for details. |
Proxy method to Graph.get_shortest_paths()
This method calls the get_shortest_paths() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.get_shortest_paths() for details. |
Proxy method to Graph.incident(..., mode="in")
This method calls the incident() method of the Graph
class with this vertex as the first argument and "in" as the mode argument, and returns the result.
See Also | |
Graph.incident() for details. |
Proxy method to Graph.incident()
This method calls the incident() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.incident() for details. |
Proxy method to Graph.indegree()
This method calls the indegree() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.indegree() for details. |
Proxy method to Graph.is_minimal_separator()
This method calls the is_minimal_separator() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.is_minimal_separator() for details. |
Proxy method to Graph.is_separator()
This method calls the is_separator() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.is_separator() for details. |
Proxy method to Graph.neighbors()
This method calls the neighbors() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.neighbors() for details. |
Proxy method to Graph.incident(..., mode="out")
This method calls the incident() method of the Graph
class with this vertex as the first argument and "out" as the mode argument, and returns the result.
See Also | |
Graph.incident() for details. |
Proxy method to Graph.outdegree()
This method calls the outdegree() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.outdegree() for details. |
Proxy method to Graph.pagerank()
This method calls the pagerank() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.pagerank() for details. |
Proxy method to Graph.personalized_pagerank()
This method calls the personalized_pagerank() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.personalized_pagerank() for details. |
Proxy method to Graph.predecessors()
This method calls the predecessors() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.predecessors() for details. |
Proxy method to Graph.shortest_paths()
This method calls the shortest_paths() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.shortest_paths() for details. |
Proxy method to Graph.strength()
This method calls the strength() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.strength() for details. |
Proxy method to Graph.successors()
This method calls the successors() method of the Graph
class with this vertex as the first argument, and returns the result.
See Also | |
Graph.successors() for details. |
Updates the attributes of the vertex from dict/iterable E and F.
If E has a keys() method, it does: for k in E: self[k] = E[k]. If E lacks a keys() method, it does: for (k, v) in E: self[k] = v. In either case, this is followed by: for k in F: self[k] = F[k].
This method thus behaves similarly to the update() method of Python dictionaries.