Please include a link to GitHub when  you refer to the source code. Thanks.

Yes, when you add vertices, there will be a reallocation. Igraph is
optimised for graphs that do not change much.

There is no function to preallocate memory for a graph. The reason for this
is that we reorder the vectors that store the structure, anyway, so you
would not gain much with preallocation in most cases.

Gabor
On Sep 11, 2015 1:26 PM, "Hadidi, Lars" <[email protected]>
wrote:

> According to lines 375-376 in file 'type_indexededgelist.c' there will be
> a vector reseizing when adding vertices to a graph.
>
> What does the comment /*reserved*/ mean in that context ? Will there be a
> reallocation or is it preallocated, and if so, is
>
> there a function on a graph which I can use to do a memory reservation ?
>
> _______________________________________________
> igraph-help mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to