Module networkx.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 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},
}
Classes |
Forest |
Forest visitor: build a forest of trees as a list of networkx 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. |
__author__
-
- Type:
-
str
- Value:
'Aric Hagberg (hagberg@lanl.gov)'
|
|
__credits__
-
- Type:
-
str
- Value:
|
__date__
-
- Type:
-
str
- Value:
'$Date: 2005-06-15 08:17:35 -0600 (Wed, 15 Jun 2005) $'
|
|
__revision__
-
- Type:
-
str
- Value:
|