igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] How to get all component in distance 2 from the specific co


From: Gábor Csárdi
Subject: Re: [igraph] How to get all component in distance 2 from the specific compoent
Date: Mon, 23 Mar 2009 08:16:47 +0100

Hi,

On Mon, Mar 23, 2009 at 12:06 AM, Chang Jin Shin <address@hidden> wrote:
[...]
> For this, I was thinking 'subgraph' works. HOWEVER, my shortage of
> knowledge in Igraph, it does not work properily to me.
> Would you advise to me?

First of all, in an igraph graph the vertices are numbered from zero,
it seems that you were not aware of that. It is the number one igraph
catch.

No, this is not the way how subgraph() works, it just calculates the
induced subgraph, see
http://en.wikipedia.org/wiki/Induced_subgraph#Subgraphs

Perhaps what you are looking for is neighborhood() or neighborhood.graph().

Best,
G.

> Cheers,
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

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