2010-08-01から1ヶ月間の記事一覧

 メモ

なんか史料になる昔の人の日記みたい。 「景気低迷で日本は失われた世代の若者の国になりつつある。」 By CHARLES HUGH SMITH http://econdays.net/?p=702

python で強連結成分分解

ライブラリnetworkxを使うと簡単。 import networkx as nx G=nx.read_edgelist("test.net",create_using=nx.DiGraph()) j=nx.strongle_connected_components(G) l=0 for i in j: for k in i: print k,l; l=l+1; 最大強連結成分の抜き出し。 import networkx …

gsl で乱数発生

C

http://mine-weblog.blogspot.com/2009/05/gsl.html http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distribution-Examples.html #include <stdio.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> int main(){ const gsl_rng_type *T; //乱数生成器のタイプ gsl_rng *r; gs</gsl/gsl_randist.h></gsl/gsl_rng.h></stdio.h>…