graph_tool.util - Graph utilities

Summary

find_vertex Find all vertices v for which prop[v] = match.
find_vertex_range Find all vertices v for which range[0] <= prop[v] <= range[1].
find_edge Find all edges e for which prop[e] = match.
find_edge_range Find all edges e for which range[0] <= prop[e] <= range[1].

Contents

graph_tool.util.find_vertex(g, prop, match)[source]

Find all vertices v for which prop[v] = match. The parameter prop can be either a PropertyMap or string with value “in”, “out” or “total”, representing a degree type.

graph_tool.util.find_vertex_range(g, prop, range)[source]

Find all vertices v for which range[0] <= prop[v] <= range[1]. The parameter prop can be either a PropertyMap or string with value”in”, “out” or “total”, representing a degree type.

graph_tool.util.find_edge(g, prop, match)[source]

Find all edges e for which prop[e] = match. The parameter prop must be a PropertyMap.

graph_tool.util.find_edge_range(g, prop, range)[source]

Find all edges e for which range[0] <= prop[e] <= range[1]. The parameter prop can be either a PropertyMap.