Package networkx :: Module search_class
[hide private]
[frames] | no frames]

Module search_class

source code

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 networkx.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},
}



Date: $Date: 2005-06-15 08:17:35 -0600 (Wed, 15 Jun 2005) $

Author: Aric Hagberg (hagberg@lanl.gov)

Classes [hide private]
  Search
Generic graph traversal (search) class.
  Preorder
Preorder visitor Builds a list of nodes in preorder of search.
  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.
  Successor
Successor visitor Builds a dict of nodes with sucessor vertex list as data.
  Length
Path length visitor.
  Forest
Forest visitor: build a forest of trees as a list of networkx DiGraphs.
Functions [hide private]
 
_test_suite() source code
Variables [hide private]
  __credits__ = ''
  __revision__ = '$Revision: 1025 $'