pub struct LeadingEigenvector {
pub membership: Vec<i64>,
pub merges: Vec<(i64, i64)>,
pub modularity: f64,
pub eigenvalues: Vec<f64>,
pub eigenvectors: Vec<Vec<f64>>,
pub history: Vec<LeadingEigenvectorEvent>,
}Expand description
Result of Newman’s leading eigenvector method,
see Graph::community_leading_eigenvector.
Fields§
§membership: Vec<i64>Community id of each vertex after all the splits.
merges: Vec<(i64, i64)>The splits, replayed backwards as merges of community ids (not
vertex ids): with p final communities, the first pair forms
community p, the second p + 1, … Use
le_community_to_membership to undo splits.
modularity: f64Modularity of the final division.
eigenvalues: Vec<f64>Eigenvalue computed at each step (NaN for steps given by the
initial partition); non-positive values did not result in a split.
eigenvectors: Vec<Vec<f64>>Eigenvector computed at each step, restricted to the vertices of the community being split (empty for steps given by the initial partition).
history: Vec<LeadingEigenvectorEvent>A trace of the algorithm.
Implementations§
Source§impl LeadingEigenvector
impl LeadingEigenvector
Sourcepub fn num_communities(&self) -> usize
pub fn num_communities(&self) -> usize
Number of communities in membership.
Sourcepub fn communities(&self) -> Vec<Vec<VertexId>>
pub fn communities(&self) -> Vec<Vec<VertexId>>
The vertices of each community, indexed by community id.
Trait Implementations§
Source§impl Clone for LeadingEigenvector
impl Clone for LeadingEigenvector
Source§fn clone(&self) -> LeadingEigenvector
fn clone(&self) -> LeadingEigenvector
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LeadingEigenvector
impl Debug for LeadingEigenvector
Source§impl PartialEq for LeadingEigenvector
impl PartialEq for LeadingEigenvector
Source§fn eq(&self, other: &LeadingEigenvector) -> bool
fn eq(&self, other: &LeadingEigenvector) -> bool
self and other values to be equal, and is used by ==.