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

2019-03-29 Thread Szabolcs Horvát
See here for connected components:
https://igraph.org/python/doc/igraph.Graph-class.html#clusters

On Fri, 29 Mar 2019 at 18:02, Gokce Dilek  wrote:

> 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  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
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


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

2019-03-29 Thread Gokce Dilek
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  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
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


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

2019-03-29 Thread Tamas Nepusz
> 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
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


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

2019-03-29 Thread Gokce Dilek
Hello,

Sorry that I forgot to mention that. It is Python!



On Fri, 29 Mar 2019 at 01:12, Tamas Nepusz  wrote:

> Hello,
>
> Is it C, Python or R?
>
> T.
>
>
> On Fri, 29 Mar 2019 at 01:47, Gokce Dilek  wrote:
>
>> Hello,
>>
>> How can we iterate through vertices, vertex attributes and attribute
>> values, and same for the edges?
>>
>> Thank you!
>> Gokce Dilek
>> ___
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


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

2019-03-29 Thread Tamas Nepusz
Hello,

Is it C, Python or R?

T.


On Fri, 29 Mar 2019 at 01:47, Gokce Dilek  wrote:

> Hello,
>
> How can we iterate through vertices, vertex attributes and attribute
> values, and same for the edges?
>
> Thank you!
> Gokce Dilek
> ___
> igraph-help mailing list
> igraph-help@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
___
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help