igraph-help
[Top][All Lists]
Advanced

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

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


From: Choi, Jae
Subject: [igraph] how to determine the number of unique child nodes in a tree
Date: Thu, 12 Jul 2012 15:44:42 -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. 

Jae

(I am sorry if this topic has been already covered. My search through
the help-list was non-exhaustive.)



reply via email to

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