Hi Gabor,

Sorry I only come back to you only now.  shortest.paths does not seem to
indicate the vertices that have been traversed in the shortest paths - just
a matrix of those shortest paths. Accordingly, calculating closeness in
terms of the harmonic mean distance between vertices (only of of shortest
paths passing through a desired vertix!) is not possible this way. Alas, it
is, in fact not evident to a non-programmer how to select the shortest
paths going though i and then return the harmonic mean of these shortest
paths, for all i.

Having looked at closeness(), is seems that closeness is currently done as:

res <- .Call("R_igraph_closeness", graph, vids - 1, mode,  weights, PACKAGE
= "igraph")

How do I learn more of what is being done by this function? Many thanks.

B.


On 30 November 2012 13:28, Bob Pap <bob...@googlemail.com> wrote:

> Many thanks, I will give it a try.
>
>
> On 29 November 2012 17:25, Gábor Csárdi <csa...@rmki.kfki.hu> wrote:
>
>> Then you can just call shortest.path() (or the equivalent in Python), and
>> work from its output.
>>
>> G.
>>
>>
>> On Thu, Nov 29, 2012 at 11:22 AM, Bob Pap <bob...@googlemail.com> wrote:
>>
>>> instead of (1/sum(distances over i)) you do (sum(1/distances) over i
>>> minus the vertix of reference) (for which 1/d would be infinite).
>>> Kind regards,
>>> Bob
>>>
>>>
>>> On 29 November 2012 16:11, Gábor Csárdi <csa...@rmki.kfki.hu> wrote:
>>>
>>>> Hi Bob,
>>>>
>>>> What exactly is the harmonic distance between vertices? Sorry, I don't
>>>> have Newman's book at hand....
>>>>
>>>> G.
>>>>
>>>>
>>>>  On Tue, Nov 27, 2012 at 5:42 AM, Bob Pap <bob...@googlemail.com>wrote:
>>>>
>>>>>  Dear all,
>>>>>
>>>>> closeness and average path length functions in igraph are not defined
>>>>> in terms of the harmonic distance between vertices (and no option exists 
>>>>> in
>>>>> version 0.6). Any suggestion on how to implement within igraph this
>>>>> conceptually interesting and straight-forward modification (see for
>>>>> instance Newman's Network book on pages 184 and 185) would be very
>>>>> appreciated - essentially sums are slightly different and over vertices 
>>>>> not
>>>>> including the reference one.
>>>>>
>>>>> Kind regards,
>>>>> Bob
>>>>>
>>>>> _______________________________________________
>>>>> igraph-help mailing list
>>>>> igraph-help@nongnu.org
>>>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Gabor Csardi <csa...@rmki.kfki.hu>     MTA KFKI RMKI
>>>>
>>>>
>>>> _______________________________________________
>>>> igraph-help mailing list
>>>> igraph-help@nongnu.org
>>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>>>
>>>>
>>>
>>> _______________________________________________
>>> igraph-help mailing list
>>> igraph-help@nongnu.org
>>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>>
>>>
>>
>>
>> --
>> Gabor Csardi <csa...@rmki.kfki.hu>     MTA KFKI RMKI
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> igraph-help@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/igraph-help
>>
>>
>


-- 
Kindly,
Bob Pap
_______________________________________________
igraph-help mailing list
igraph-help@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to