Package gmisclib :: Module nbest
[frames] | no frames]

Module nbest

source code

Beam search through a graph.

Classes
  node
This is a node of a graph, it includes links to other nodes.
Functions
 
go(graph, nbeam, cbeam)
Search the graph for the lowest cost routes.
source code
 
test() source code
Variables
  __package__ = None
hash(x)
Function Details

go(graph, nbeam, cbeam)

source code 

Search the graph for the lowest cost routes. Returns [ (cost, route), ...] where cost is the cost of a route, and route is [node, node, node, ...] the list of nodes on the route. Routes are sorted in order of increasing cost.