[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] Re: Minimu spanning tree in C
From: |
Gábor Csárdi |
Subject: |
[igraph] Re: Minimu spanning tree in C |
Date: |
Tue, 10 Nov 2009 22:36:53 +0100 |
On Tue, Nov 10, 2009 at 10:21 PM, wassim znaidi <address@hidden> wrote:
> Gábor Csárdi a écrit :
>
> Hi,
>
> permute the vertices with the permute_vertices() function, calculate
> the spanning tree, and permute them back. But don't think that this
> way you can generate all spanning trees, in general you cannot. It is
>
>
> not even sure that different root vertices will give you different
> spanning trees, they might just all give the same.
>
> Hi, i don't want to compute all the spanning tree from one graph. I want
> just to choose the root before creating the spannig graph (not always the
> vertex with id 0).
> I try to use the permute_vertices() function, if i would only permute the
> vertex 0, how could do it ? It told me that the vector permutation must have
> the same size of the graph so i must enter all the vertex permutation ?
Yes, create a full length permutation vector, that only changes the
root vertex with another one and leaves the rest of the vertices with
the same ID.
--
Gabor Csardi <address@hidden> UNIL DGM