python-igraph manual

For using igraph from Python

   Home       Trees       Indices       Help   
Package igraph :: Class Vertex
[hide private]

Class Vertex

source code

object --+
         |
        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
Instance Methods [hide private]
 
__delitem__(x, y)
del x[y]
source code
 
__eq__(x, y)
x==y
source code
 
__ge__(x, y)
x>=y
source code
 
__getitem__(x, y)
x[y]
source code
 
__gt__(x, y)
x>y
source code
 
__hash__(x)
hash(x)
source code
 
__le__(x, y)
x<=y
source code
 
__len__(x)
len(x)
source code
 
__lt__(x, y)
x<y
source code
 
__ne__(x, y)
x!=y
source code
 
__repr__(x)
repr(x)
source code
 
__setitem__(x, i, y)
x[i]=y
source code
list
attribute_names()
Returns the list of vertex attribute names
source code
dict
attributes()
Returns a dict of attribute names and values for the vertex
source code
 
betweenness(...)
Proxy method to Graph.betweenness()
source code
 
closeness(...)
Proxy method to Graph.closeness()
source code
 
constraint(...)
Proxy method to Graph.constraint()
source code
 
degree(...)
Proxy method to Graph.degree()
source code
 
delete(...)
Proxy method to Graph.delete_vertices()
source code
 
diversity(...)
Proxy method to Graph.diversity()
source code
 
eccentricity(...)
Proxy method to Graph.eccentricity()
source code
 
get_shortest_paths(...)
Proxy method to Graph.get_shortest_paths()
source code
 
indegree(...)
Proxy method to Graph.indegree()
source code
 
is_minimal_separator(...)
Proxy method to Graph.is_minimal_separator()
source code
 
is_separator(...)
Proxy method to Graph.is_separator()
source code
 
neighbors(...)
Proxy method to Graph.neighbors()
source code
 
outdegree(...)
Proxy method to Graph.outdegree()
source code
 
pagerank(...)
Proxy method to Graph.pagerank()
source code
 
personalized_pagerank(...)
Proxy method to Graph.personalized_pagerank()
source code
 
predecessors(...)
Proxy method to Graph.predecessors()
source code
 
shortest_paths(...)
Proxy method to Graph.shortest_paths()
source code
 
strength(...)
Proxy method to Graph.strength()
source code
 
successors(...)
Proxy method to Graph.successors()
source code
None
update_attributes(E, **F)
Updates the attributes of the vertex from dict/iterable E and F.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __init__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]
  graph
The graph the vertex belongs to
  index
Index of the vertex

Inherited from object: __class__

Method Details [hide private]

__hash__(x)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__

__repr__(x)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__

betweenness(...)

source code 

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.

closeness(...)

source code 

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.

constraint(...)

source code 

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.

degree(...)

source code 

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.

delete(...)

source code 

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.

diversity(...)

source code 

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.

eccentricity(...)

source code 

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.

get_shortest_paths(...)

source code 

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.

indegree(...)

source code 

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.

is_minimal_separator(...)

source code 

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.

is_separator(...)

source code 

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.

neighbors(...)

source code 

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.

outdegree(...)

source code 

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.

pagerank(...)

source code 

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.

personalized_pagerank(...)

source code 

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.

predecessors(...)

source code 

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.

shortest_paths(...)

source code 

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.

strength(...)

source code 

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.

successors(...)

source code 

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.

update_attributes(E, **F)

source code 

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.

Returns: None

   Home       Trees       Indices       Help