Understanding Graph Basics
169
2: 0.0,
3: 0.13333333333333333,
4: 0.03333333333333333,
5: 0.06666666666666667,
6: 0.0,
7: 0.0}
As you might expect, node 7 has no effect on transfer between other nodes because
it has no connections to the other nodes. Likewise, because node 6 is a leaf node
with only one connection to another node, it has no effect on transfers. Look again
at Figure 8-5. The subgraph consisting of nodes 1, 3, 4, and 5 have the greatest
effect on the transfer of items in this case. No connection exists between nodes 1
and 4, so nodes 3 and 5 act as intermediaries. In this case, node 2 acts like a
leaf node.
NetworkX provides you with a number of other centrality functions. You find
a complete list of these functions at
http://networkx.readthedocs.io/en/
stable/reference/algorithms.centrality.html
. The important consideration
is determining how you want to calculate importance. Considering centrality in
light of the kind of importance you want to attach to the vertexes and edges in a
graph is essential.
Do'stlaringiz bilan baham: |