Documentation
¶
Overview ¶
Package config provides configuration settings for the graph algorithms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssortativityCoefficientConfig ¶ added in v0.6.4
type AssortativityCoefficientConfig struct { // Mode selects which degree pairing to use. // Defaults: // - If graph is undirected: "projected" // - If graph is directed: "out-in" Mode AssortativityMode // IgnoreSelfLoops controls whether to ignore self loops (u==v). // Default: true IgnoreSelfLoops bool }
AssortativityCoefficientConfig holds the configuration settings for the assortativity coefficient algorithm.
type AssortativityMode ¶ added in v0.6.4
type AssortativityMode string
AssortativityMode defines how degree pairs (j,k) are taken on each edge/arc. - Projected: ignore direction; use undirected degrees on both ends. - OutIn: use out-degree(u) and in-degree(v) for each arc u->v - OutOut: out-degree(u) and out-degree(v) - InIn: in-degree(u) and in-degree(v) - InOut: in-degree(u) and out-degree(v)
const ( AssortativityProjected AssortativityMode = "projected" AssortativityOutIn AssortativityMode = "out-in" AssortativityOutOut AssortativityMode = "out-out" AssortativityInIn AssortativityMode = "in-in" AssortativityInOut AssortativityMode = "in-out" )
type BetweennessCentralityConfig ¶ added in v0.6.1
type BetweennessCentralityConfig struct {
Normalized bool
}
BetweennessCentralityConfig holds the configuration settings for the edge betweenness centrality algorithm.
type ClosenessCentralityConfig ¶
ClosenessCentralityConfig holds the configuration settings for the closeness centrality algorithm.
type Config ¶
type Config struct { Workers int Betweenness *BetweennessCentralityConfig Closeness *ClosenessCentralityConfig Degree *DegreeCentralityConfig EdgeBetweenness *EdgeBetweennessCentralityConfig Eigenvector *EigenvectorCentralityConfig PageRank *PageRankConfig Assortativity *AssortativityCoefficientConfig Modularity *ModularityConfig }
Config holds the configuration settings for the graph algorithms.
type DegreeCentralityConfig ¶
type DegreeCentralityConfig struct {
Mode string
}
DegreeCentralityConfig holds the configuration settings for the degree centrality algorithm.
type EdgeBetweennessCentralityConfig ¶
type EdgeBetweennessCentralityConfig struct {
Normalized bool
}
EdgeBetweennessCentralityConfig holds the configuration settings for the edge betweenness centrality algorithm.
type EigenvectorCentralityConfig ¶
type EigenvectorCentralityConfig struct { MaxIter int Tol float64 Reverse bool NStart *map[node.ID]float64 // initial vector; if nil, uniform distribution }
EigenvectorCentralityConfig holds the configuration settings for the eigenvector centrality algorithm.
type ModularityConfig ¶ added in v0.6.4
type ModularityConfig struct { // Partition maps each node to its community ID. // If nil, algorithm will compute greedy modularity communities automatically. Partition map[node.ID]int }
ModularityConfig holds the configuration settings for the modularity calculation.
type PageRankConfig ¶
type PageRankConfig struct { Alpha float64 // damping, default 0.85 MaxIter int // default 100 Tol float64 // L1 error, default 1e-6 Personalization *map[node.ID]float64 // p(u); if nil is uniform Dangling *map[node.ID]float64 // d(u); if nil p(u) Reverse bool }
PageRankConfig holds the configuration settings for the PageRank algorithm.