Package pygraph :: Package algorithms :: Package heuristics :: Module chow :: Class chow

Class chow


An implementation of the graph searching heuristic proposed by Edmond Chow.

Remember to call the optimize() method before the heuristic search.

For details, check: http://www.edmondchow.com/pubs/levdiff-aaai.pdf.

Instance Methods
 
__init__(self, *centers)
Initialize a Chow heuristic object.
 
optimize(self, graph)
Build a dictionary mapping each pair of nodes to a number (the distance between them).
 
__call__(self, start, end)
Estimate how far start is from end.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, *centers)
(Constructor)

 

Initialize a Chow heuristic object.

Overrides: object.__init__

optimize(self, graph)

 

Build a dictionary mapping each pair of nodes to a number (the distance between them).

Parameters:
  • graph (graph) - Graph.

__call__(self, start, end)
(Call operator)

 

Estimate how far start is from end.

Parameters:
  • start (node) - Start node.
  • end (node) - End node.