{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / 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 : iterable

An n-d index into the costs array.

Returns

traceback : list of n-d tuples

A list of indices into the costs array, starting with one of the start positions passed to find_costs(), and ending with the given end index. These indices specify the minimum-cost path from any given start index to the end index. (The total cost of that path can be read out from the cumulative_costs array returned by find_costs().)

Aliases

  • skimage.graph.MCP.traceback