pub struct CommunityDetectionResult {
pub communities: Vec<Vec<NodeId>>,
pub num_communities: usize,
pub modularity: f64,
}Expand description
Community detection result
Fields§
§communities: Vec<Vec<NodeId>>Communities, each containing a list of node IDs
num_communities: usizeTotal number of communities found
modularity: f64Modularity score (quality metric for community structure)
Implementations§
Source§impl CommunityDetectionResult
impl CommunityDetectionResult
Sourcepub fn get_community(&self, node: NodeId) -> Option<usize>
pub fn get_community(&self, node: NodeId) -> Option<usize>
Get the community ID for a given node
Returns None if node not found in any community
Sourcepub fn get_community_nodes(&self, comm_id: usize) -> Option<&[NodeId]>
pub fn get_community_nodes(&self, comm_id: usize) -> Option<&[NodeId]>
Get all nodes in a specific community
Sourcepub fn community_size(&self, comm_id: usize) -> Option<usize>
pub fn community_size(&self, comm_id: usize) -> Option<usize>
Get size of a specific community
Trait Implementations§
Source§impl Clone for CommunityDetectionResult
impl Clone for CommunityDetectionResult
Source§fn clone(&self) -> CommunityDetectionResult
fn clone(&self) -> CommunityDetectionResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CommunityDetectionResult
impl RefUnwindSafe for CommunityDetectionResult
impl Send for CommunityDetectionResult
impl Sync for CommunityDetectionResult
impl Unpin for CommunityDetectionResult
impl UnsafeUnpin for CommunityDetectionResult
impl UnwindSafe for CommunityDetectionResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more