Package Bio :: Package Pathway :: Package Rep :: Module MultiGraph :: Class MultiGraph
[show private | hide private]
[frames | no frames]

Class MultiGraph


A directed multigraph abstraction with labeled edges.
Method Summary
  __init__(self, nodes)
Initializes a new MultiGraph object.
  __eq__(self, g)
Returns true if g is equal to this graph.
  __ne__(self, g)
Returns true if g is not equal to this graph.
  __repr__(self)
Returns an unique string representation of this graph.
  __str__(self)
Returns a concise string description of this graph.
  add_edge(self, source, to, label)
Adds an edge to this graph.
  add_node(self, node)
Adds a node to this graph.
  child_edges(self, parent)
Returns a list of (child, label) pairs for parent.
  children(self, parent)
Returns a list of unique children for parent.
  edges(self, label)
Returns a list of all the edges with this label.
  labels(self)
Returns a list of all the edge labels in this graph.
  nodes(self)
Returns a list of the nodes in this graph.
  parent_edges(self, child)
Returns a list of (parent, label) pairs for child.
  parents(self, child)
Returns a list of unique parents for child.
  remove_edge(self, parent, child, label)
Removes edge.
  remove_node(self, node)
Removes node and all edges connected to it.

Method Details

__init__(self, nodes=[])
(Constructor)

Initializes a new MultiGraph object.

__eq__(self, g)
(Equality operator)

Returns true if g is equal to this graph.

__ne__(self, g)

Returns true if g is not equal to this graph.

__repr__(self)
(Representation operator)

Returns an unique string representation of this graph.

__str__(self)
(Informal representation operator)

Returns a concise string description of this graph.

add_edge(self, source, to, label=None)

Adds an edge to this graph.

add_node(self, node)

Adds a node to this graph.

child_edges(self, parent)

Returns a list of (child, label) pairs for parent.

children(self, parent)

Returns a list of unique children for parent.

edges(self, label)

Returns a list of all the edges with this label.

labels(self)

Returns a list of all the edge labels in this graph.

nodes(self)

Returns a list of the nodes in this graph.

parent_edges(self, child)

Returns a list of (parent, label) pairs for child.

parents(self, child)

Returns a list of unique parents for child.

remove_edge(self, parent, child, label)

Removes edge. -- NOT IMPLEMENTED

remove_node(self, node)

Removes node and all edges connected to it.

Generated by Epydoc 2.1 on Wed Jan 31 09:58:01 2007 http://epydoc.sf.net