igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] how to determine unique child nodes in a tree


From: Lao Tse
Subject: [igraph] how to determine unique child nodes in a tree
Date: Thu, 12 Jul 2012 15:45:16 -0300

Dear igraph/network gurus,

Given some tree and a reference position in that tree, I would like to
be able to query the graph to identify the unique terminal child nodes.

As an example, in the graph:

0-1-2-3-4-5-6
 |  |-7-8-9
 |  |-10-11
 |    |-12
 |
 |-13-14-15
    |-16-17

and given the node 2 as a reference, there are 4 terminal nodes (6, 9,
11,12).

Is there a simple means of identifying these terminal nodes? I am using
the R-library and can code it directly within R-syntax (brute force
but slow). I am wondering if there is a more elegant algorithm or
hopefully based on igraph. Looking through the igraph manual, I did not see an obvious solution.

Jae


reply via email to

[Prev in Thread] Current Thread [Next in Thread]