Created
August 30, 2014 16:49
-
-
Save shirayuca/7b1e86c8b26ed0f5d63e to your computer and use it in GitHub Desktop.
格子グラフの描画と平均経路長算出
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 格子グラフを描画し、平均経路長を算出します。 | |
# 20 × 20 の格子も、作図と平均経路長を算出してみましょう | |
library(igraph) | |
graph2 <- graph.lattice(c(10,10)) # 10×10 の格子 | |
plot(graph2) | |
dev.off() | |
average.path.length(graph2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment