pub enum LeidenObjective {
Modularity,
Cpm,
ErdosRenyi,
}Expand description
Objective function optimized by Graph::community_leiden_simple
(igraph_leiden_objective_t).
With A the adjacency matrix, m the total edge weight, k the
degrees, γ the resolution and δ(c_i, c_j) the co-membership
indicator:
Variants§
Modularity
Generalized modularity Q = 1/(2m) Σ_ij (A_ij − γ k_i k_j / (2m)) δ(c_i, c_j)
(directed: 1/m Σ_ij (A_ij − γ k^out_i k^in_j / m) δ(c_i, c_j)),
i.e. a configuration model null model. Weights must be non-negative.
Cpm
Constant Potts model Q = 1/(2m) Σ_ij (A_ij − γ) δ(c_i, c_j), free of
the resolution limit. Negative weights are allowed.
ErdosRenyi
Erdős–Rényi null model Q = 1/(2m) Σ_ij (A_ij − γ p) δ(c_i, c_j),
p being the weighted density. Weights must be non-negative.
Trait Implementations§
Source§impl Clone for LeidenObjective
impl Clone for LeidenObjective
Source§fn clone(&self) -> LeidenObjective
fn clone(&self) -> LeidenObjective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LeidenObjective
Source§impl Debug for LeidenObjective
impl Debug for LeidenObjective
impl Eq for LeidenObjective
Source§impl From<LeidenObjective> for igraph_leiden_objective_t
impl From<LeidenObjective> for igraph_leiden_objective_t
Source§fn from(value: LeidenObjective) -> igraph_leiden_objective_t
fn from(value: LeidenObjective) -> igraph_leiden_objective_t
Converts to this type from the input type.
Source§impl Hash for LeidenObjective
impl Hash for LeidenObjective
Source§impl PartialEq for LeidenObjective
impl PartialEq for LeidenObjective
Source§fn eq(&self, other: &LeidenObjective) -> bool
fn eq(&self, other: &LeidenObjective) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for LeidenObjective
Auto Trait Implementations§
impl Freeze for LeidenObjective
impl RefUnwindSafe for LeidenObjective
impl Send for LeidenObjective
impl Sync for LeidenObjective
impl Unpin for LeidenObjective
impl UnsafeUnpin for LeidenObjective
impl UnwindSafe for LeidenObjective
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more