Examples for 'igraph::cluster_spinglass'


Finding communities in graphs based on statistical meachanics

Aliases: cluster_spinglass spinglass.community

Keywords: graphs

### ** Examples


  g <- sample_gnp(10, 5/10) %du% sample_gnp(9, 5/9)
  g <- add_edges(g, c(1, 12))
  g <- induced_subgraph(g, subcomponent(g, 1))
  cluster_spinglass(g, spins=2)
IGRAPH clustering spinglass, groups: 2, mod: 0.47
+ groups:
  $`1`
   [1]  1  2  3  4  5  6  7  8  9 10
  
  $`2`
  [1] 11 12 13 14 15 16 17 18 19
  
  cluster_spinglass(g, vertex=1)
$community
 [1]  1  3  4  7  5 10  8  6  9  2

$cohesion
[1] 9.147436

$adhesion
[1] -18.29487

$inner.links
[1] 17

$outer.links
[1] 1

[Package igraph version 1.3.1 Index]