Zog.Community (Zog v0.1.0)
View SourceNative community detection algorithms backed by Zog (Zig) via Zigler.
Summary
Functions
Detects communities using the Label Propagation Algorithm (LPA).
Detects communities using the Leiden algorithm.
Full hierarchical Leiden detection returning a Dendrogram.
Detects communities using the Louvain algorithm.
Computes the modularity of a given community partition.
Functions
@spec label_propagation( Zog.SoA.t(), keyword() ) :: %{required(Zog.SoA.label()) => non_neg_integer()}
Detects communities using the Label Propagation Algorithm (LPA).
@spec label_propagation( 0..18_446_744_073_709_551_615, [0..4_294_967_295] | <<_::_*32>>, [0..4_294_967_295] | <<_::_*32>>, [float()] | <<_::_*64>>, 0..18_446_744_073_709_551_615, 0..18_446_744_073_709_551_615 ) :: [0..18_446_744_073_709_551_615]
@spec leiden( Zog.SoA.t(), keyword() ) :: %{required(Zog.SoA.label()) => non_neg_integer()}
Detects communities using the Leiden algorithm.
@spec leiden_hierarchical( Zog.SoA.t(), keyword() ) :: Zog.Community.Dendrogram.t()
Full hierarchical Leiden detection returning a Dendrogram.
@spec louvain( Zog.SoA.t(), keyword() ) :: %{required(Zog.SoA.label()) => non_neg_integer()}
Detects communities using the Louvain algorithm.
@spec modularity(Zog.SoA.t(), %{required(Zog.SoA.label()) => non_neg_integer()}) :: float()
Computes the modularity of a given community partition.