Skip to contents

induced_subgraph() can be achieved in two steps with induced_subgraph_edges() and subgraph_from_edges(), but it is much slower than expected.

Usage

induced_subgraph(graph, vids, impl = 0L)

induced_subgraph_edges(graph, vids)

subgraph_from_edges(graph, eids, delete_vertices = TRUE)

Arguments

graph

igraph_ptr object.

vids

Vertices of interest.

impl

how to construct a new graph: {0: AUTO, 1: COPY_AND_DELETE, 2: CREATE_FROM_SCRATCH}

eids

Edges of interest.

delete_vertices

whether to delete the unused vertices.