title: Calculation of betweenness in iGraph
body: <p>I've seen some <a href="https://stackoverflow.com/questions/20388087/differences-in-centrality-measures-between-igraph-and-tnet">info</a> suggesting that closeness in iGraph weighted graphs is calculated using the weights as costs, rather than strengths. </p>
  
  <p>I'm wondering if this is also true for betweenness. i.e, if I have two paths between vertices, one of them (a) with edge weights summing to 100 and the other (b) to 200, betweenness will interpret path a as the least costly path and include this edge weight value in the numerator of the betweenness calculation. </p>
  
  <p>If so, to obtain betweenness based on strength, I assume one would transform the weights to equal 1/weight? </p>
  
  <p>I've tried to test this with a three node edge file as follows:</p>
  
  <pre><code>V1  V2 weight
  1    2      1
  1    3      4
  2    3      1
  </code></pre>
  
  <p>Using the weights as supplied above, node 2 has a betweenness of 1, and others=0. This seems to indicate that the betweenness calculation is avoiding the path from 2->1->3 because it's viewing the high weights as a cost. </p>
  
  <p>However, if I create a new weighting variable: 
  <code>E(g)$weightI &lt;- 1/E(g)$weight</code></p>
  
  <p>And run betweenness:
  <code>b&lt;-data.frame(betweenness(g, V(g), directed=FALSE, weights=E(g)$weightI))</code>, </p>
  
  <p>all the betweenness values are 0, which is unexpected and not especially helpful in sorting out my initial question</p>