label_parallel_edges

label_parallel_edges#

graph_tool.generation.label_parallel_edges(g, mark_only=False, eprop=None)[source]#

Label edges which are parallel, i.e, have the same source and target vertices. For each parallel edge set \(PE\), the labelling starts from 0 to \(|PE|-1\). If mark_only==True, all parallel edges are simply marked with the value 1. If the eprop parameter is given (a EdgePropertyMap), the labelling is stored there.

Parallel implementation.

If enabled during compilation, this algorithm will run in parallel using OpenMP. See the parallel algorithms section for information about how to control several aspects of parallelization.