cugraph.dask.community.induced_subgraph.induced_subgraph#
- cugraph.dask.community.induced_subgraph.induced_subgraph(input_graph, vertices: Series | DataFrame, offsets: list | Series = None) Tuple[DataFrame, Series][source]#
Compute a subgraph of the existing graph including only the specified vertices. This algorithm works with both directed and undirected graphs and does not actually traverse the edges, but instead simply pulls out any edges that are incident on vertices that are both contained in the vertices list.
If no subgraph can be extracted from the vertices provided, a ‘None’ value will be returned.
- Parameters:
- input_graphcugraph.Graph
Graph or matrix object, which should contain the connectivity information. Edge weights, if present, should be single or double precision floating point values.
- verticescudf.Series or cudf.DataFrame
Specifies the vertices of the induced subgraph. For multi-column vertices, vertices should be provided as a cudf.DataFrame
- offsetslist or cudf.Series, optional
Specifies the subgraph offsets into the subgraph vertices. If no offsets array is provided, a default array [0, len(vertices)] will be used.
- Returns:
- ego_edge_listsdask_cudf.DataFrame
Distributed GPU data frame containing all induced sources identifiers, destination identifiers, edge weights
- seeds_offsets: dask_cudf.Series
Distributed Series containing the starting offset in the returned edge list for each seed.