longest_simple_paths#

ifermi.analysis.longest_simple_paths(vertices, edges)[source]#

Find the shortest paths that go through all vertices.

The lines are broken up into the connected sublines. Note this function is only designed to work with connected sublines that are either simple cycles or chains with no branches.

Parameters:
  • vertices (ndarray) – (n, 2) float array of the line vertices.

  • edges (ndarray) – (m, 2) int array of the edges.

Return type:

list[ndarray]

Returns:

A list of (k, ) int arrays (one for each connected subline) specifying the path.