# fastgreedy.community

From igraph v0.4.4
by Gabor Csardi

##### Community structure via greedy optimization of modularity

This function tries to find dense subgraph, also called communities in graphs via directly optimizing a modularity score.

- Keywords
- graphs

##### Usage

`fastgreedy.community(graph, merges=TRUE, modularity=TRUE)`

##### Arguments

- graph
- The input graph
- merges
- Logical scalar, whether to return the merge matrix.
- modularity
- Logcal scalar, whether to return a vector containing the modularity after each merge.

##### Details

This function implements the fast greedy modularity optimization algorithm for finding community structure, see A Clauset, MEJ Newman, C Moore: Finding community structure in very large networks, http://www.arxiv.org/abs/cond-mat/0408187 for the details.

##### Value

- A named list with the following members:
- merges

`N`

) minus one belong to individual vertices. The first line of the matrix gives the first merge, this merge creates community`N`

, the number of vertices, the second merge creates community`N+1`

, etc. } modularity A numeric vector containing the modularity value of the community structure after performing every merge.

##### References

A Clauset, MEJ Newman, C Moore: Finding community structure in very large networks, http://www.arxiv.org/abs/cond-mat/0408187

##### See Also

`walktrap.community`

,
`spinglass.community`

,
`leading.eigenvector.community`

,
`edge.betweenness.community`

##### Examples

```
g <- graph.full(5) %du% graph.full(5) %du% graph.full(5)
g <- add.edges(g, c(0,5, 0,10, 5, 10))
fastgreedy.community(g)
# The highest value of modularity is before performing the last two
# merges. So this network naturally has three communities.
```

*Documentation reproduced from package igraph, version 0.4.4, License: GPL version 2 or later (June, 1991)*

### Community examples

Looks like there are no examples yet.