config

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClosenessCentralityConfig

type ClosenessCentralityConfig struct {
	Reverse    bool
	WfImproved bool
}

ClosenessCentralityConfig holds the configuration settings for the closeness centrality algorithm.

type Config

type Config struct {
	Workers         int
	Closeness       *ClosenessCentralityConfig
	PageRank        *PageRankConfig
	EdgeBetweenness *EdgeBetweennessCentralityConfig
	Eigenvector     *EigenvectorCentralityConfig
	Degree          *DegreeCentralityConfig
}

Config holds the configuration settings for the graph algorithms.

func Default

func Default() *Config

Default returns the default configuration for the graph algorithms.

type DegreeCentralityConfig

type DegreeCentralityConfig struct {
	Mode string
}

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
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL