Ah good idea, thanks!
On 04/25/2014 12:50 AM, Xiaohu Hu wrote:
> Hi,
>
> I have got another question.
>
> So I have here a graph with N vertices and M edges. Given a subset of
> n vertices, I would like to count how many edges are there between
> these n vertices of the subset. Is there any existing graph-tool
> function that can be used for this task?
No, but you can just construct a filtered graph with a GraphView
containing only those nodes, and just call num_edges() on that.
Best,
Tiago
--
Tiago de Paula Peixoto <tiago@skewed.de>
_______________________________________________
graph-tool mailing list
graph-tool@skewed.de
http://lists.skewed.de/mailman/listinfo/graph-tool