pub struct CommunityDetection;Expand description
Community Detection algorithm implementations.
Implementations§
Source§impl CommunityDetection
impl CommunityDetection
Sourcepub fn label_propagation<T: Transaction>(
tx: &T,
config: &CommunityDetectionConfig,
) -> GraphResult<CommunityResult>
pub fn label_propagation<T: Transaction>( tx: &T, config: &CommunityDetectionConfig, ) -> GraphResult<CommunityResult>
Detect communities using Label Propagation Algorithm.
This is a fast, near-linear time algorithm that doesn’t require knowing the number of communities in advance.
§Arguments
tx- The transaction to use for graph accessconfig- Configuration parameters for the algorithm
§Returns
A CommunityResult containing community assignments for all nodes.
Sourcepub fn label_propagation_for_nodes<T: Transaction>(
tx: &T,
nodes: &[EntityId],
config: &CommunityDetectionConfig,
) -> GraphResult<CommunityResult>
pub fn label_propagation_for_nodes<T: Transaction>( tx: &T, nodes: &[EntityId], config: &CommunityDetectionConfig, ) -> GraphResult<CommunityResult>
Detect communities for a subset of nodes.
Only considers edges within the specified subgraph.
§Arguments
tx- The transaction to use for graph accessnodes- The nodes to include in the computationconfig- Configuration parameters for the algorithm
Auto Trait Implementations§
impl Freeze for CommunityDetection
impl RefUnwindSafe for CommunityDetection
impl Send for CommunityDetection
impl Sync for CommunityDetection
impl Unpin for CommunityDetection
impl UnsafeUnpin for CommunityDetection
impl UnwindSafe for CommunityDetection
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