igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] How to construct graphs dynamically?


From: Gábor Csárdi
Subject: Re: [igraph] How to construct graphs dynamically?
Date: Thu, 2 Jan 2014 22:45:12 -0500

See  http://igraph.sourceforge.net/doc/R/graph.structure.html

Gabor

On Thu, Jan 2, 2014 at 10:34 PM, Xuan Wang <address@hidden> wrote:
> Thanks a lot!
>
> I might also need some help with another question:
>
> I have a graph A, then I want to add edges dynamically to the graph.
> Currently what I am doing is: use get.edgelist(A) to get the edgelist as a
> matrix, then change this matrix into a vector, then attach new edges to the
> end this vector, and finally use graph(edges, n) to construct the new graph.
>
> I want to add edges to the graph one by one. Each edge is added based on the
> structure of the graph in the previous step. What would be an efficient way
> of doing this?
>
> Thanks,
>
> Xuan Wang (PhD)
> Department of Statistics and Operations Research,
> University of North Carolina at Chapel Hill,
> Chapel Hill, NC, 27514
> address@hidden
> http://xwang.web.unc.edu
>
>
>
>
> On Jan 3, 2014, at 1:00 AM, address@hidden wrote:
>
>
> In my mind, the ideal way of doing this is starting with the layout
> layout.fruchterman.reingold(A), then add a few edges and do a few more
> iterations on the layout to get the layout for graph B. Could anyone help me
> with this?
>
>
> layout.fruchtermain.reingold() has a parameter named ?start? where you can
> pass a two-column matrix with the initial positions of the vertices. You may
> also want to specify the ?niter? parameter for the second call in order to
> run a few iterations only instead of 500 (the default).
>
> T.
>
>
>
> _______________________________________________
> 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]