Differences
This shows you the differences between two versions of the page.
|
projs:clans:docs:sps:handler.calp_source_target [2014/01/21 01:27] honeyzhaoqian created |
projs:clans:docs:sps:handler.calp_source_target [2014/01/21 15:22] (current) yoyoliliu |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Handler.calP(source,target) ====== | ====== Handler.calP(source,target) ====== | ||
| - | ====== Description ====== | + | Return the shortest from source to target in a weighted graph G. |
| - | ====== Parameter ====== | + | - Parameters |
| - | ====== Detail Information ====== | + | - - source: node |
| + | - - - starting node | ||
| + | - - target: node | ||
| + | - - - Ending node | ||
| + | - - weight: string,optional(default='weight') | ||
| + | - Return: path: list | ||
| + | - - - List of nodes in a shortest path. | ||
| + | - Raises: NoPath: if no path exists between source and target, return null. | ||
| + | - Related function: | ||
| + | [[http://networkx.github.io/documentation/latest/reference/generated/networkx.algorithms.shortest_paths.weighted.dijkstra_path.html#networkx.algorithms.shortest_paths.weighted.dijkstra_path]] | ||