[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] Help with the igraph_diameter(...)
From: |
Gabor Csardi |
Subject: |
Re: [igraph] Help with the igraph_diameter(...) |
Date: |
Tue, 29 Jan 2008 22:36:39 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hmmm, the docs at
http://cneurocvs.rmki.kfki.hu/igraph/doc/html/ch10s02.html#igraph_diameter
say
path: Pointer to an initialized vector. If not NULL the actual longest
geodesic path will be stored here. The vector will be resized as
needed.
So you need
igraph_vector_t path;
igraph_vector_init(&path, 0);
igraph_diameter(&graph, &diam, &pfrom, &pto, &path, false, true);
G.
On Tue, Jan 29, 2008 at 04:06:47PM -0500, Richard Geddes wrote:
> Hi,
>
> I'm trying to get the path for the diameter of a graph and get segfault
> errors when I use the following
>
>
> ---
> igraph_t graph;
> igraph_integer_t diam, pfrom, pto;
> igraph_vector_t* path;
>
> igraph_diameter(&graph, &diam, &pfrom, &pto, path, false, true);
>
> ---
>
> however if I use:
>
> igraph_diameter(&graph, &diam, &pfrom, &pto, NULL, false, true);
>
> the execution is normal
>
> the docs say to use an uninitialized vector pointer for path. Did I
> miss something?
>
> using the latest development version of igraph.
>
> Richard
>
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
--
Csardi Gabor <address@hidden> UNIL DGM