Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 53d0e1096ea04ebad73d8a5190fa9e04 > files > 1036

python3-networkx-1.8.1-7.mga5.noarch.rpm

#!/usr/bin/env python
"""
Zachary's Karate Club graph

Data file from:
http://vlado.fmf.uni-lj.si/pub/networks/data/Ucinet/UciData.htm

Reference:
Zachary W. (1977).
An information flow model for conflict and fission in small groups.
Journal of Anthropological Research, 33, 452-473.
"""
import networkx as nx
G=nx.karate_club_graph()
print("Node Degree")
for v in G:
    print('%s %s' % (v,G.degree(v)))