pub struct EdgeBetweennessCommunities {
pub removed_edges: Vec<EdgeId>,
pub edge_betweenness: Vec<f64>,
pub merges: Vec<(i64, i64)>,
pub bridges: Vec<i64>,
pub modularity: Vec<f64>,
pub membership: Vec<i64>,
}Expand description
Result of the Girvan–Newman algorithm, see Graph::community_edge_betweenness.
Fields§
§removed_edges: Vec<EdgeId>The ids of the removed edges, in order of removal.
edge_betweenness: Vec<f64>Betweenness of each removed edge at the moment of its removal (not divided by the weights).
merges: Vec<(i64, i64)>The dendrogram, obtained by replaying the removals backwards.
bridges: Vec<i64>Indices into removed_edges of the edges whose
removal split a component, in reverse order.
modularity: Vec<f64>Modularity of each division: before the first merge (all components
split into single vertices) and after each merge, i.e.
merges.len() + 1 values in the order of merges.
membership: Vec<i64>Membership vector of the division with the highest modularity.
Implementations§
Source§impl EdgeBetweennessCommunities
impl EdgeBetweennessCommunities
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 EdgeBetweennessCommunities
impl Clone for EdgeBetweennessCommunities
Source§fn clone(&self) -> EdgeBetweennessCommunities
fn clone(&self) -> EdgeBetweennessCommunities
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 EdgeBetweennessCommunities
impl Debug for EdgeBetweennessCommunities
Source§impl PartialEq for EdgeBetweennessCommunities
impl PartialEq for EdgeBetweennessCommunities
Source§fn eq(&self, other: &EdgeBetweennessCommunities) -> bool
fn eq(&self, other: &EdgeBetweennessCommunities) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EdgeBetweennessCommunities
Auto Trait Implementations§
impl Freeze for EdgeBetweennessCommunities
impl RefUnwindSafe for EdgeBetweennessCommunities
impl Send for EdgeBetweennessCommunities
impl Sync for EdgeBetweennessCommunities
impl Unpin for EdgeBetweennessCommunities
impl UnsafeUnpin for EdgeBetweennessCommunities
impl UnwindSafe for EdgeBetweennessCommunities
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