|
From: | Matthew Walker |
Subject: | Re: [igraph] Recommended values for Kamada-Kawai layout |
Date: | Thu, 22 Oct 2009 12:24:04 -0400 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090812) |
Hi Gábor, I've tried to follow your instructions. My patch (to layout.c) is attached but I have a couple of questions: (i) is this correctly done? (ii) is this the best way to send such patches? Cheers, Matthew Gábor Csárdi wrote: Hi Matthew, good point. Actually, for Python and R we have default values for all layout generators, please see e.g. http://igraph.sourceforge.net/doc/R/layout.html and http://igraph.sourceforge.net/doc/R/layout.drl.html But you are right, for C the default values should be documented. If you wish to do this, the best way is downloading the latest igraph version from Launchpad, or in your case a couple of files, such as src/layout.c should be enough, updating the files, and sending a patch with the changes. You can download the individual files here: http://bazaar.launchpad.net/~igraph/igraph/0.6-main/files/head:/src/ Please tell me if anything is unclear. Thanks, best, Gabor On Thu, Oct 22, 2009 at 5:20 PM, Matthew Walker <address@hidden> wrote:Hi, I do not know if this is the appropriate place to say this, but I found it useful to know some recommended values [1] for the Kamada-Kawai layout algorithm. I noticed that the graphopt algorithm's documentation included such values and I found them very useful. Perhaps we could add some recommended values to the documentation for igraph_layout_kamada_kawai()? I would be happy to contribute such a (minor) modification to the code's documentation, but I do not know if you would want this, nor the best way to offer it to you. [1] http://svitsrv25.epfl.ch/R-doc/library/sna/html/gplot3d.layout.html Cheers, Matthew _______________________________________________ igraph-help mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/igraph-help |
*** layout.c 2009-10-22 11:53:00.000000000 -0400 --- layout-modified.c 2009-10-22 12:22:57.000000000 -0400 *************** *** 536,551 **** * This function was ported from the SNA R package. * \param graph A graph object. * \param res Pointer to an initialized matrix object. This will ! * contain the result and will be resized if needed. ! * \param niter The number of iterations to perform. * \param sigma Sets the base standard deviation of position ! * change proposals. * \param initemp Sets the initial temperature for the annealing. ! * \param coolexp The cooling exponent of the annealing. * \param kkconst The Kamada-Kawai vertex attraction constant. ! * \param use_seed Boolean, whether to use the values cupplied in the \p res ! * argument as the initial configuration. If zero then a random initial ! * configuration is used. * \return Error code. * * Time complexity: O(|V|^2) for each --- 536,557 ---- * This function was ported from the SNA R package. * \param graph A graph object. * \param res Pointer to an initialized matrix object. This will ! * contain the result (x-positions in column zero and ! * y-positions in column one) and will be resized if needed. ! * \param niter The number of iterations to perform. ! * Typical value: 1000. * \param sigma Sets the base standard deviation of position ! * change proposals. ! * Typical value: (number of vertices)/4. * \param initemp Sets the initial temperature for the annealing. ! * Typical value: 10. ! * \param coolexp The cooling exponent of the annealing. ! * Typical value: 0.99. * \param kkconst The Kamada-Kawai vertex attraction constant. ! * Typical value: (number of vertices)^2 ! * \param use_seed Boolean, whether to use the values supplied in the ! * \p res argument as the initial configuration. If zero then a ! * random initial configuration is used. * \return Error code. * * Time complexity: O(|V|^2) for each
[Prev in Thread] | Current Thread | [Next in Thread] |