Package igraph :: Class Edge
[hide private]
[frames] | no frames]

Class Edge

object --+
         |
        Edge

Class representing a single edge in a graph.

The edge is referenced by its index, so if the underlying graph changes, the semantics of the edge object might change as well (if the edge indices are altered in the original graph).

The attributes of the edge can be accessed by using the edge as a hash:

>>> e["weight"] = 2
>>> print e["weight"]
2
Instance Methods [hide private]
 
__delitem__(x, y)
del x[y]
 
__getitem__(x, y)
x[y]
 
__len__(x)
len(x)
 
__repr__(x)
repr(x)
 
__setitem__(x, i, y)
x[i]=y
list
attribute_names()
Returns the list of edge attribute names
list
attributes()
Returns a dict of attribute names and values for the edge

Inherited from object: __delattr__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]
  index
Index of this edge
  source
Source node index of this edge
  target
Target node index of this edge
  tuple
Source and target node index of this edge as a tuple

Inherited from object: __class__

Method Details [hide private]

__repr__(x)
(Representation operator)

 

repr(x)

Overrides: object.__repr__