Obtaining a vertex or edge induced subgraph
Hi, given a graph G, I want to traverse G in some way, e.g., a random walk of length k, resulting in a set S of vertices or edges. What is the fastest way of retrieving the subgraph of G induced by S. Is there a better way than using a property map and then GraphView? Best regards Christopher
On 18.09.2015 11:13, Christopher Morris wrote:
Hi,
given a graph G, I want to traverse G in some way, e.g., a random walk of length k, resulting in a set S of vertices or edges. What is the fastest way of retrieving the subgraph of G induced by S.
Is there a better way than using a property map and then GraphView?
You either use a GraphView, or you build the subgraph by hand while traversing the graph. I see not other option. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
On 18.09.2015 11:15, Tiago de Paula Peixoto wrote:
On 18.09.2015 11:13, Christopher Morris wrote:
Hi,
given a graph G, I want to traverse G in some way, e.g., a random walk of length k, resulting in a set S of vertices or edges. What is the fastest way of retrieving the subgraph of G induced by S.
Is there a better way than using a property map and then GraphView?
You either use a GraphView, or you build the subgraph by hand while traversing the graph. I see not other option.
I should also point out that building a GraphView with vertex property map is O(1), so it should be as efficient as you can get. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
participants (2)
-
Christopher Morris -
Tiago de Paula Peixoto