Zog.Community (Zog v0.4.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.
Detects communities using the Walktrap algorithm (Pons & Latapy).
Full hierarchical Walktrap detection returning a Dendrogram.
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.
@spec walktrap( Zog.SoA.t() | Yog.Graph.t(), keyword() ) :: Zog.Community.Result.t()
Detects communities using the Walktrap algorithm (Pons & Latapy).
@spec walktrap_hierarchical(Zog.SoA.t() | Yog.Graph.t(), keyword() | integer()) :: Zog.Community.Dendrogram.t()
Full hierarchical Walktrap detection returning a Dendrogram.
@spec walktrap_hierarchical( 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]]