igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] problem about mincut


From: Gábor Csárdi
Subject: Re: [igraph] problem about mincut
Date: Wed, 5 Nov 2014 10:42:01 -0500

Hi, please send a full reproducible example. Gabor

On Wed, Nov 5, 2014 at 10:20 AM, Jeffery <address@hidden> wrote:
> hello
> Recently i am trying to use igraph_mincut to get the min edge cut value and
> parition the graph to two parts.
> Although it can get the mincut value correctly, the vertex ids stored in
> igraph_vector_t partition and partition2
> make no sense becase they are full of zero.
> the function is defined as follow:
>
> int igraph_mincut(const igraph_t *graph,
> igraph_real_t *value,
> igraph_vector_t *partition,
> igraph_vector_t *partition2,
> igraph_vector_t *cut,
> const igraph_vector_t *capacity);
>
> I'm sure I have initialized the parameters, such as partition,partition2 and
> cut .I debug the mincut function and i find that the lacal variable
> mincut_step is zero.
> The adjacency list of my test case is follow:
>
> 0 : 1 2
> 1 : 0 4
> 2 : 0 5
> 4 : 1 7
> 5 : 2 8
> 7 : 4 9
> 8 : 5 10 10
> 9 : 7 11
> 10 : 8 8 11 12 13
> 11 : 9 10 14
> 12 : 10 14 15
> 13 : 10 15
> 14 : 11 12 15
> 15 : 12 13 14
>
> the returned edgecut of igraph_mincut includes the edge 0-1 and 1-4, I
> accept. The first part after partition should only contain the vertex 1
> while
> the second part should include the other vertexs. However they are full of
> zero.
> So have u faced a similar situation ? How do i resolve it?
>
> p.s sometimes, the mincut of a graph is not unique and i want the function
> to do balanced partition, namely the vertex num of the first part is roughly
> equal to that of the second part. Could such function can be implemented in
> igraph_mincut?
>
> Thanks a lot.
>
>                           Guopeng.
>
>
>
>
> _______________________________________________
> 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]