Zog.Community.Dendrogram (Zog v0.1.0)
View SourceHierarchical community structure from algorithms like Louvain, Leiden.
Summary
Functions
Get partition with approximately n communities.
Get the coarsest partition (fewest communities).
Get the finest partition (most communities).
Backward compatibility: convert from legacy map format.
Get partition at a specific level index.
Creates a new dendrogram from a list of community levels.
Creates a new dendrogram with merge order tracking.
Get the number of hierarchical levels.
Convert to legacy map format.
Types
@type t() :: %Zog.Community.Dendrogram{ levels: [Zog.Community.Result.t()], merge_order: [{non_neg_integer(), non_neg_integer()}], metadata: map() }
Functions
@spec at_level(t(), non_neg_integer()) :: Zog.Community.Result.t() | nil
Get partition with approximately n communities.
@spec coarsest(t()) :: Zog.Community.Result.t()
Get the coarsest partition (fewest communities).
@spec finest(t()) :: Zog.Community.Result.t()
Get the finest partition (most communities).
Backward compatibility: convert from legacy map format.
@spec get_level(t(), non_neg_integer()) :: Zog.Community.Result.t() | nil
Get partition at a specific level index.
@spec new([Zog.Community.Result.t()]) :: t()
Creates a new dendrogram from a list of community levels.
@spec new([Zog.Community.Result.t()], [{non_neg_integer(), non_neg_integer()}]) :: t()
Creates a new dendrogram with merge order tracking.
@spec num_levels(t()) :: non_neg_integer()
Get the number of hierarchical levels.
Convert to legacy map format.