[Top][All Lists]

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

Re: [igraph] Leverage centrality implementation in igraph

From: Alex Upton
Subject: Re: [igraph] Leverage centrality implementation in igraph
Date: Fri, 27 Jul 2012 14:44:17 +0100

Thank you Tamás for your help, I have implemented it and it works. If anyone 
else is interested in using it, I have put the code in the format of a 
function, which is as follows:

lvcent <- function(graph){

k <- degree(graph)
n <- vcount(graph)

sapply(1:n, function(v) { mean((k[v]-k[neighbors(graph,v)]) / 
(k[v]+k[neighbors(graph,v)])) }) 


Kind regards,


Alex Upton, BEng, MRes, PG Cert Business Administration

PhD Researcher Biomedical Informatics, Signals and Systems 
School of Electronic, Electrical and Computer Engineering, 
College of Engineering and Physical Sciences, University of Birmingham
Edgbaston, Birmingham, B15 2TT, United Kingdom

Fax: +44 121 4144291 (school general office)
Email: address@hidden

Personal Web: http://postgrad.eee.bham.ac.uk/uptona/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]