igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] I am not understanding something.....


From: Marco
Subject: Re: [igraph] I am not understanding something.....
Date: Wed, 18 Jun 2008 13:21:40 +0200

Hey, what a fast response! Thanks!

Ok, i was *almost* there. :)

Now, how can i build a cycle like "for every vertex in G"?

Thanks again!

marco


On Wed, Jun 18, 2008 at 1:17 PM, Tamas Nepusz <address@hidden> wrote:
>> I am not understanding how to cycle on every node of a graph, and once
>> "i am looking" at a one node, how to cycle between the neighbors of
>> that node....
>
> Given a Graph object g, g.neighbors(i) gives you the neighbors of node i.
> g.successors(i) gives you the successors of that node (following outgoing
> edges), while g.predecessors(i) gives you the predecessors (following the
> incoming edges). Note that you'll have to supply vertex IDs to
> g.neighbors().
>
> E.g.:
>
>>>> g = Graph.Tree(10,3)
>>>> g.neighbors(0)
> [1, 2, 3]
>
> --
> T.
>
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Calvin Coolidge  - "I have never been hurt by what I have not said."




reply via email to

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