QualityMetrics

Trait QualityMetrics 

Source
pub trait QualityMetrics {
    // Required methods
    fn resolution(&self) -> f64;
    fn node_size(&self, graph: &Graph<usize>, node_id: NodeIdx) -> usize;
}

Required Methods§

Source

fn resolution(&self) -> f64

Resolution paramater used to compute quality and well connected nodes and communities. In the Leiden paper, this is referenced as γ.

Source

fn node_size(&self, graph: &Graph<usize>, node_id: NodeIdx) -> usize

Metric to determine the node size i.e. ||.||

In the CPM, all nodes have a constant size of 1. In the context of modularity, the size of a node is the number of edges it has (namely, its degree).

Implementors§