Package mdp :: Package graph :: Class GraphNode
[hide private]
[frames] | no frames]

Class GraphNode


Represent a graph node and all information attached to it.

Instance Methods [hide private]
 
__init__(self, data=None)
x.__init__(...) initializes x; see help(type(x)) for signature
 
add_edge_in(self, edge)
 
add_edge_out(self, edge)
 
degree(self)
Return the number of edges.
 
get_edges(self, neighbor=None)
Return a copy of all edges.
 
get_edges_in(self, from_=None)
Return a copy of the list of the entering edges.
 
get_edges_out(self, to_=None)
Return a copy of the list of the outgoing edges.
 
in_degree(self)
Return the number of entering edges.
 
in_neighbors(self)
Return the neighbors down in-edges (i.e.
 
neighbors(self)
 
out_degree(self)
Return the number of outgoing edges.
 
out_neighbors(self)
Return the neighbors down in-edges (i.e.
 
remove_edge_in(self, edge)
 
remove_edge_out(self, edge)

Inherited from unreachable.newobject: __long__, __native__, __nonzero__, __unicode__, next

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, data=None)
(Constructor)

 
x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

add_edge_in(self, edge)

 

add_edge_out(self, edge)

 

degree(self)

 
Return the number of edges.

get_edges(self, neighbor=None)

 
Return a copy of all edges. If neighbor is specified, return
only the edges connected to that node.

get_edges_in(self, from_=None)

 
Return a copy of the list of the entering edges. If from_
is specified, return only the nodes coming from that node.

get_edges_out(self, to_=None)

 
Return a copy of the list of the outgoing edges. If to_
is specified, return only the nodes going to that node.

in_degree(self)

 
Return the number of entering edges.

in_neighbors(self)

 
Return the neighbors down in-edges (i.e. the parents nodes).

neighbors(self)

 

out_degree(self)

 
Return the number of outgoing edges.

out_neighbors(self)

 
Return the neighbors down in-edges (i.e. the parents nodes).

remove_edge_in(self, edge)

 

remove_edge_out(self, edge)