#!/usr/bin/local/python# -*- coding: utf-8 -*-import networkx as nx#二項分布(p=0.1)に従ってリンクの張られるランダムネットワークG = nx.binomial_graph(10,0.1)print G.nodes()print G.edges()#連結成分分解components = nx.component.connected_components(G)print components
No comments:
Post a Comment