I am producing a graph, generated by a list of adjacent nodes. (The list looks like {1 ->583, 1->2977, 2->14, 4->1293, 5->221, ...}
. Each node of my graph is a number.
I wanted to get the centrality measures for this graph so I used:
bc = BetweennessCentrality[graph1]
This yields the entire list of centrality measures, (in the order in which the nodes appear in my list i guess?)
{6., 0., 0., 0., 0., 3., 5., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.,
1., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.,
0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.}
I would like to find a way to obtain the centrality measure for a precise node, say, node 2. I only know of this kind of way :
bc[[2]]
But this only gives me the second entry in the obtained list, not the centrality measure for node number 2. What I would really need is to generate a list with the first 10 nodes in my graph and their respective centrality measures.
Grid[Transpose[{VertexList[graph1], bc}]]
. I'll update my answer here instead. $\endgroup$