bundles / skimage latest / skimage / graph / _mcp / MCP / traceback
cython_function_or_method
skimage.graph._mcp:MCP.traceback
Signature
def traceback ( end ) Summary
Trace a minimum cost path through the pre-calculated traceback array.
Extended Summary
This convenience function reconstructs the the minimum cost path to a given end position from one of the starting indices provided to find_costs(), which must have been called previously. This function can be called as many times as desired after find_costs() has been run.
Parameters
end: iterableAn n-d index into the
costsarray.
Returns
traceback: list of n-d tuplesA list of indices into the
costsarray, starting with one of the start positions passed to find_costs(), and ending with the givenendindex. These indices specify the minimum-cost path from any given start index to theendindex. (The total cost of that path can be read out from thecumulative_costsarray returned by find_costs().)
Aliases
-
skimage.graph.MCP.traceback