  Community detection in graphs is a problem that is likely to be relevant
whenever network data appears, and consequently the problem has received much
attention with many different methods and algorithms applied. However, many of
these methods are hard to study theoretically, and they optimise for somewhat
different goals. A general and rigorous account of the problem and possible
methods remains elusive.
  We study the class of all clustering methods that are monotone under addition
of vertices and edges, phrasing this as a functoriality notion. We show that if
additionally we require the methods to have no resolution limit in a strong
sense, this is equivalent to a notion of representability, which requires them
to be explainable and determined by a representing set of graphs. We show that
representable clustering methods are always computable in polynomial time, and
in any nowhere dense class they are computable in roughly quadratic time.
  Finally, we extend our definitions to the case of hierarchical clustering,
and give a notion of representability for hierarchical clustering schemes.
