//! Community detection traits.
usecrate::error::Result;usepetgraph::graph::UnGraph;/// Trait for community detection algorithms.
pubtraitCommunityDetection{/// Detect communities in a graph.
////// Returns a mapping from node index to community ID.
fndetect<N, E>(&self, graph:&UnGraph<N, E>)->Result<Vec<usize>>;/// Get the resolution parameter (if applicable).
fnresolution(&self)->f64{1.0}}