all_predecessors

all_predecessors#

graph_tool.topology.all_predecessors(g, dist_map, pred_map, weights=None, epsilon=1e-08)[source]#

Return a property map with all possible predecessors in the search tree determined by dist_map and pred_map.

Parameters:
gGraph

Graph to be used.

dist_mapVertexPropertyMap

Vertex property map with the distances from source to all other vertices.

pred_mapVertexPropertyMap

Vertex property map with the predecessors in the search tree.

weightsEdgePropertyMap (optional, default: None)

The edge weights.

epsilonfloat (optional, default: 1e-8)

Maximum relative difference between distances to be considered “equal”, in case floating-point weights are used.

Returns:
all_preds_mapVertexPropertyMap

Vector-valued vertex property map with all possible predecessors in the search tree.