% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/communities.R
\name{community_fast_greedy}
\alias{community_fast_greedy}
\alias{com_fg}
\title{Fast Greedy Community Detection}
\usage{
community_fast_greedy(
  x,
  weights = NULL,
  merges = TRUE,
  modularity = TRUE,
  membership = TRUE,
  ...
)

com_fg(
  x,
  weights = NULL,
  merges = TRUE,
  modularity = TRUE,
  membership = TRUE,
  ...
)
}
\arguments{
\item{x}{Network input}

\item{weights}{Edge weights. NULL uses network weights, NA for unweighted.}

\item{merges}{Logical; return merge matrix? Default TRUE.}

\item{modularity}{Logical; return modularity scores? Default TRUE.}

\item{membership}{Logical; return membership vector? Default TRUE.}

\item{...}{Additional arguments passed to \code{\link{to_igraph}}}
}
\value{
A \code{cograph_communities} object with optional dendrogram

A \code{cograph_communities} object. See \code{\link{detect_communities}}.
}
\description{
Hierarchical agglomeration using greedy modularity optimization.
Produces a dendrogram of community merges.
}
\examples{
\dontshow{if (requireNamespace("igraph", quietly = TRUE)) withAutoprint(\{ # examplesIf}
g <- igraph::make_graph("Zachary")
comm <- community_fast_greedy(g)
igraph::membership(comm)
\dontshow{\}) # examplesIf}
}
\references{
Clauset, A., Newman, M.E.J., & Moore, C. (2004).
Finding community structure in very large networks.
\emph{Physical Review E}, 70, 066111.
}
