Versions in this module Expand all Collapse all v0 v0.1.0 Jul 20, 2026 Changes in this version + func AMI(a, b Partition) float64 + func ARI(a, b Partition) float64 + func NMI(a, b Partition) float64 + type Builder struct + func NewBuilder() *Builder + func NewDirectedBuilder() *Builder + func (b *Builder) AddEdge(from, to string, weight float64) *Builder + func (b *Builder) AddNodeWeight(key string, size float64) *Builder + func (b *Builder) Build() (*Graph, error) + func (b *Builder) Canonical() *Builder + type Graph struct + func (g *Graph) Directed() bool + func (g *Graph) Index(key string) (int, bool) + func (g *Graph) Key(i int) string + func (g *Graph) NumNodes() int + type Option func(*runConfig) + func WithIterations(iterations int) Option + func WithParallelism(workers int) Option + func WithQuality(q QualityFunction) Option + func WithResolution(gamma float64) Option + func WithSeed(seed uint64) Option + type Partition []int + type QualityFunction interface + Quality func(g *csr, p Partition) float64 + func CPM(gamma float64) QualityFunction + func DirectedModularity(gamma float64) QualityFunction + func Modularity(gamma float64) QualityFunction + type Result struct + func Leiden(g *Graph, opts ...Option) (*Result, error) + func Louvain(g *Graph, opts ...Option) (*Result, error) + func (r *Result) Communities() map[string]int + func (r *Result) Quality() float64