pub struct Clustering {
pub membership: Vec<i64>,
pub modularity: f64,
}Expand description
A flat partition of the vertices together with its modularity.
Returned by Graph::community_optimal_modularity.
Fields§
§membership: Vec<i64>Community id of each vertex, numbered from zero.
modularity: f64Modularity of the partition (NaN for graphs without edges).
Implementations§
Source§impl Clustering
impl Clustering
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 Clustering
impl Clone for Clustering
Source§fn clone(&self) -> Clustering
fn clone(&self) -> Clustering
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 moreSource§impl Debug for Clustering
impl Debug for Clustering
Source§impl PartialEq for Clustering
impl PartialEq for Clustering
Source§fn eq(&self, other: &Clustering) -> bool
fn eq(&self, other: &Clustering) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Clustering
Auto Trait Implementations§
impl Freeze for Clustering
impl RefUnwindSafe for Clustering
impl Send for Clustering
impl Sync for Clustering
impl Unpin for Clustering
impl UnsafeUnpin for Clustering
impl UnwindSafe for Clustering
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