igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] igraph_community_fastgreedy() in C


From: Gábor Csárdi
Subject: Re: [igraph] igraph_community_fastgreedy() in C
Date: Mon, 11 Oct 2010 00:13:44 +0200

On Sun, Oct 10, 2010 at 11:54 PM, Guilherme Ferraz de Arruda
<address@hidden> wrote:
> Ok, but,
>
> I have created my graph with:
>
> igraph_weighted_adjacency(grafo, &w_adj, IGRAPH_ADJ_MAX, 0);
>
> can i use the name parameter as NULL at EANV()?
>
> #define EANV(graph,n,vec)
> graph: The graph.
> n: The name of the attribute.
> vec: Pointer to an initialized vector, the result is stored here. It
> will be resized, if needed.
>
> what is the name that i need to use?

http://igraph.sourceforge.net/doc/html/igraph_weighted_adjacency.html

says:

"attr:    the name of the attribute that will store the edge weights.
If NULL , it will use weight as the attribute name."

so if you used NULL, the name of the attribute will be "weight".

Best,
Gabor

> Thanks for all.
>
> Guilherme.
>
> 2010/10/10 Gábor Csárdi <address@hidden>:
>> Hi,
>>
>> for this you need to use the attribute handler, as
>> igraph_weighted_adjacency adds edge weights as attributes. Please see
>> http://igraph.sourceforge.net/doc/html/ch09s02.html
>> http://igraph.sourceforge.net/doc/html/ch09s02s01.html#igraph_cattribute_EANV
>> http://igraph.sourceforge.net/doc/html/ch09s02s01.html#EANV
>>
>> Then you can pass the edge weight vector to igraph_community_fastgreedy.
>>
>> Best,
>> Gabor
>>
>> On Sat, Oct 9, 2010 at 8:26 PM, Guilherme Ferraz de Arruda
>> <address@hidden> wrote:
>>> Hi,
>>>
>>> I was trying to use the igraph_community_fastgreedy() function with C,
>>> but how can i use the: const igraph_vector_t *weights ?
>>> What is the sequence of edges?
>>>
>>> I have builded my graph with igraph_weighted_adjacency(), may i need
>>> to use the weights vector?
>>>
>>> Thanks for all.
>>>
>>> Guilherme.
>>>
>>> _______________________________________________
>>> igraph-help mailing list
>>> address@hidden
>>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>>>
>>
>>
>>
>> --
>> Gabor Csardi <address@hidden>     UNIL DGM
>>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM



reply via email to

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