Package lepl :: Package regexp :: Module core :: Class BaseGraph
[hide private]
[frames] | no frames]

Class BaseGraph

source code


Describes a collection of connected nodes.
Instance Methods [hide private]
 
__init__(self, alphabet)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
terminate(self, node, labels)
Indicate that the node terminates with the given labels.
source code
 
new_node(self)
Get a new node.
source code
 
connect(self, src, dest, edge)
Define a connection between src and dest, with an edge value (a character).
source code
 
__iter__(self)
An iterator over all nodes.
source code
 
transitions(self, src)
An iterator over all non-empty transitions from src - returns (dest, edge) pairs.
source code
 
terminals(self, node)
An iterator over the terminals for the give node.
source code
 
__len__(self) source code

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, alphabet)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature
Overrides: object.__init__
(inherited documentation)