dasi.design.optimize

Functions

argmin(w)

fill_diag(w, fillval)

fill_diag_inf(w)

index_slice(indices, arr)

From tuple of indices, return zipped items.

only_ab(w, nodelist)

only_long(w, query_length, nodelist)

optimize_graph(graph, query_length, cyclic, …)

rtype

Tuple[List[List[tuple]], List[float]]

Functions

_check_paths(paths)

Validates a path to check for duplicate nodes.

_multinode_to_shortest_path(graph, nodes, cyclic)

Estimate the shortest path that touches the specified nodes.

_nodes_to_fullpaths(graph, cycle_endpoints, …)

Recover full paths from cycle endpoints.

index_slice(indices, arr)

From tuple of indices, return zipped items.

dasi.design.optimize._check_paths(paths)[source]

Validates a path to check for duplicate nodes.

Parameters

paths (List[List[tuple]]) –

Return type

None

Returns

dasi.design.optimize._multinode_to_shortest_path(graph, nodes, cyclic, return_length=False)[source]

Estimate the shortest path that touches the specified nodes.

Return type

List[tuple]

dasi.design.optimize._nodes_to_fullpaths(graph, cycle_endpoints, cyclic, n_paths=None)[source]

Recover full paths from cycle endpoints.

Parameters
  • graph (DiGraph) –

  • cycle_endpoints (Tuple) –

  • n_paths

Return type

List[List[Tuple]]

Returns

dasi.design.optimize.index_slice(indices, arr)[source]

From tuple of indices, return zipped items.