% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/communities.R
\name{community_fluid}
\alias{community_fluid}
\alias{com_fl}
\title{Fluid Communities Detection}
\usage{
community_fluid(x, no.of.communities, ...)

com_fl(x, no.of.communities, ...)
}
\arguments{
\item{x}{Network input}

\item{no.of.communities}{Number of communities to detect. Required.}

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

A \code{cograph_communities} object. See \code{\link{detect_communities}}.
}
\description{
Simulates fluid dynamics where communities compete for nodes.
Requires specifying the number of communities.
}
\examples{
if (requireNamespace("igraph", quietly = TRUE)) {
  g <- igraph::make_graph("Zachary")

  # Detect exactly 2 communities
  comm <- community_fluid(g, no.of.communities = 2)
}
\dontshow{if (requireNamespace("igraph", quietly = TRUE)) withAutoprint(\{ # examplesIf}
m <- matrix(runif(25), 5, 5); diag(m) <- 0
net <- as_cograph(m)
com_fl(net, no.of.communities = 2)
\dontshow{\}) # examplesIf}
}
\references{
Pares, F., Gasulla, D.G., Vilalta, A., Moreno, J., Ayguade, E.,
Labarta, J., Cortes, U., & Suzumura, T. (2018).
Fluid communities: A competitive, scalable and diverse community detection algorithm.
\emph{Studies in Computational Intelligence}, 689, 229-240.
}
