igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Vertices, Edges, Attributes & Values


From: Gokce Dilek
Subject: Re: [igraph] Vertices, Edges, Attributes & Values
Date: Fri, 29 Mar 2019 09:58:42 -0700

Thank you for your reply! Also, how can we get the connected components of a graph? Should we do it with vertex clustering?

On Fri, 29 Mar 2019 at 08:06, Tamas Nepusz <address@hidden> wrote:
How can we iterate through vertices, vertex attributes and attribute values, and same for the edges?
graph.vs["attr"] gives you the values of the "attr" vertex attribute for all the vertices in a Python list. You can then iterate over it like normal.
graph.es["attr"] is the same for edge attributes
g.vertex_attributes() gives you the list of all vertex attributes.
g.edge_attributes() gives you the list of all edge attributes.

T.
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help

reply via email to

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