Package NX :: Module search_class
[frames | no frames]

Module NX.search_class

Graph search classes

The search algorithms are implemented as an abstract class with visitor functions that are called at points during the algorithm. By designing different visitor functions the search algorithms can produce shortest path lenghts, forests of search trees, etc.

The simplest way to access the search algorithms is by using predefined visitor classes and search functions. See the module NX.search.

These algorithms are based on Program 18.10 "Generalized graph search", page 128, Algorithms in C, Part 5, Graph Algorithms by Robert Sedgewick

Reference:

@Book{sedgewick-2001-algorithms-5,
author =       {Robert Sedgewick},
title =        {Algorithms in C, Part 5: Graph Algorithms},
publisher =    {Addison Wesley Professional},
year =         {2001},
edition =      {3rd},
}

Classes
Forest Forest visitor: build a forest of trees as a list of NX DiGraphs.
Length Path length visitor.
Postorder Postorder visitor Builds a list of nodes in postorder of search.
Predecessor Predeceessor visitor Builds a dict of nodes with sucessor vertex list as data.
Preorder Preorder visitor Builds a list of nodes in preorder of search.
Search Generic graph traversal (search) class.
Successor Successor visitor Builds a dict of nodes with sucessor vertex list as data.

Variable Summary
str __author__ = 'Aric Hagberg (hagberg@lanl.gov)'
str __credits__ = ''
str __date__ = '$Date: 2005/03/30 23:56:28 $'
str __revision__ = '$Revision: 1.11 $'

Variable Details

__author__

Type:
str
Value:
'Aric Hagberg (hagberg@lanl.gov)'                                      

__credits__

Type:
str
Value:
''                                                                     

__date__

Type:
str
Value:
'$Date: 2005/03/30 23:56:28 $'                                         

__revision__

Type:
str
Value:
'$Revision: 1.11 $'                                                    

Generated by Epydoc 2.1 on Mon Apr 11 10:59:20 2005 http://epydoc.sf.net